Program Menghitung Permukaan Dan Isi Donat

Posted by Budi Arieyanto | Posted in | Posted on 04.59

#include<iostream.h>
#include<conio.h>

void main()
{
 const float phi=3.141592;
 float luas,A,B,isi;
 clrscr();

 cout<<"MENGHITUNG LUAS PERMUKAAN SERTA ISI DONAT"<<endl;


 A=10;
 B=20;

 isi=phi*phi*(B+A)*(B-A)/4;
 luas=phi*phi*(B*B-A*A);

 cout<<"\n\nNilai Luas      = "<<luas<<endl;
 cout<<"\n\nNilai Isi    = "<<isi<<endl;

 getche();
 }

Comments (0)

Posting Komentar