11. kita akan belajar menghitung volume tabung dengan menggunakan
dev c++
#include<iostream>
using namespace std ;
#define phi 3.14
int main ()
{
int r,t ;
float volume ;
cout << "input jari_jari =" ;
cin >> r ;
cout << "input tinggi =" ;
cin >> t ;
volume = phi*r*r*t;
cout << "volume =" << volume;
return 0 ;
}
dev c++
#include<iostream>
using namespace std ;
#define phi 3.14
int main ()
{
int r,t ;
float volume ;
cout << "input jari_jari =" ;
cin >> r ;
cout << "input tinggi =" ;
cin >> t ;
volume = phi*r*r*t;
cout << "volume =" << volume;
return 0 ;
}
Komentar
Posting Komentar