Program Matematika dengan C++

Menghitung Dengan Pemrograman Bahasa C++ :

  • Luas Lingkaran
  • Keliling Lingkaran
  • Volume Bola

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

int main()
 {
 double r,b,c,d,e;
 double phi=3.14;
 cout<<"Masukan jari2 = ";
 cin>>r;
 cout<<endl;
 b=phi*r*r;
 d=2*r;
 c=phi*d;
 e=4/3*phi*(r*r*r);

cout<<"\nLuas lingkaran = "<<b<<endl;
 cout<<"\nKeliling lingkaran = "<<c<<endl;
 cout<<"\nVolume bola = "<<e<<endl;

cout<<endl;
 system ("PAUSE");
 return 0;
 }

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s