#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
float p,l,lu,kel;
printf("--------------------------------------------------\n");
printf ("\t Menghitung Luas dan Keliling \n");
printf ("\t \t Persegi Panjang \n");
printf("--------------------------------------------------\n");
//input
printf("Masukan Panjang \t : ");scanf("%f",&p);
printf("Masukan Lebar \t \t : ");scanf("%f,",&l);
printf("--------------------------------------------------\n");
//proses
lu = p*l;
kel = 2*(p+l);
//output
printf("Jadi \t \t \n");
printf("Luasnya adalah \t \t : %10.2f \n",lu);
printf("Kelilingnya adalah \t : %10.2f \n",kel);
printf("--------------------------------------------------\n");
system ("PAUSE");
return 0;
}

Any feedback, questions or ideas are always welcome. In case you are posting Code ,then first escape it using Postify and then paste it in the comments
0 comments: