# 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();
}
Search
Categories
- Part I : Perkenalan (4)
- Part II : Operator (3)
- Part III : Percabangan (materi) (2)
- Part III : Percabangan (program) (4)
- Part IV : Perulangan (meteri) (3)
- Part IV : Perulangan (program) (3)
- Part V : Array (materi) (1)
- Part V : Array (program) (2)
- Penerapan (6)
- Pointer (2)
- Searching (pencarian) (3)
- Typedef (1)