#include <iostream.h>
#include <conio.h>
#define phi 3.14
main ( )
{
int r; float luas; float kel;
r = 5;
luas = phi * ( r * r );
kel = 2 * phi * r;
cout<<"Program menghitung luas dan keliling lingkaran"<<endl;
cout<<"Luas = "<<phi<<"*"<<"("<<r<<"*"<<r<<")"<<" = "<<luas<<endl;
cout<<"Keliling = "<<2<<"*"<<phi<<"*"<<r<<" = "<<kel<<endl;
getch ( );
}
COMMENTS :
0 komentar to “Konstanta 2”
Post a Comment