// menggunakan prosedur
#include<iostream.h>
void volume_limas()
{
double p, l, t,v;
cout<<"----Volume limas segi empat----"<<endl;
cout<<"Masukkan panjang: ";
cin>>p;
cout<<"Masukkan lebar: ";
cin>>l;
cout<<"Masukkan tinggi: ";
cin>>t;
v=p*l*t/3;
cout<<"Volume limas segi empat = "<<v<<endl;
}
void volume_kerucut()
{
double r, t,v;
cout<<"------Volume kerucut----"<<endl;
cout<<"Masukkan jari2: ";
cin>>r;
cout<<"Masukkan t: ";
cin>>t;
v=3.14*r*r*t/3;
cout << "Volume kerucut = "<<v<<endl;
}
void volume_bola()
{
double r,v;
cout<<"------Volume bola -----"<<endl;
cout<<"Masukkan nilai r = ";
cin>>r;
v=4*3.14*r*r*r/3;
cout<<"Volume bola = "<<v<<endl;
}
int main()
{
volume_limas();
volume_kerucut();
volume_bola();
return 0;
}