# include <conio.h>
# include <iostream.h>
# include <math.h> // Mengaktifkan fungsi-fungsi matematika pada script program
main ()
{
float r,L,K;
clrscr();
cout <<"\n*******************************";
cout <<"\n* LUAS & KELILING LINGKARAN *";
cout <<"\n*******************************";
cout <<"\n\n";
cout <<"\nMasukkan jari-jari ! = "; cin >>r;
cout <<"\nphi = " <<M_PI; //M_PI adalah fungsi matematika (phi)
L=M_PI*r*r;
K=2*M_PI*r;
cout <<"\n\n";
cout <<"\n=========";
cout <<"\n= HASIL =";
cout <<"\n=========";
cout <<"\n\n";
cout <<"\nLuas = " <<L;
cout <<"\nKeliling = " <<K;
getch();
}
0 comments:
Post a Comment