Minggu, 30 Oktober 2011

Program Menghitung Luas dan Volume Tabung

#include<iostream.h>
#include<conio.h>
int main()
{
      float phi,r,t;
      phi = 3.14;
      cout<<"r = ";cin>>r;
      cout<<"t = ";cin>>t;
      cout<<"\nKeliling Tabung = "<<2*phi*(r+r)+t<<endl;
      cout<<"\nLuas Tabung = "<<(2*phi*r*t)<<endl;
      cout<<"\nVolume Tabung = "<<(phi*r*r*t)<<endl;
      getch();
}

Tidak ada komentar:

Posting Komentar