Program Menghitung Jari Dan Luas Lingkaran Luar Dari Segitiga

Posted by Budi Arieyanto | Posted in | Posted on 04.53

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
 const float phi=3.141592;
 int A,B,C;
 float S,Y,luas;
 clrscr();

 cout<<"MENGHITUNG LUAS LINGKARAN LUAR DARI SEGITIGA"<<endl;

 A=10;
 B=5;
 C=10;

 S=0.5*(A+B+C);
 Y=(A*B*C)/4*(sqrt(S*(S-A)*(S-B)*(S-C)));
 luas=phi*Y*Y;

 cout<<"\n\nNilai Y       = "<<Y<<endl;
 cout<<"\n\nNilai Luas = "<<luas<<endl;

 getche();
 }

Comments (0)

Posting Komentar