1.
Procedure
program
Ketikkan coding dibawah ini di dalam Dev ++
#include<iostream>
using namespace
std;
void
volume_Kubus()
{
cout<<"Nama
: Orien Patriana\n";
cout<<"NIM : 09031281520035\n";
cout<<"Kelas : SI Reguler A\n\n";
double o,p,q;
cout<<"-=-=-=-=-=-=-=-=-=-=-=-=-=Volume
Kubus=-=-=-=-=-=-=-=-=-=-=-=-=\n"<<endl;
cout<<"Masukkan
panjang : ";
cin>>o;
cout<<"Masukkan
lebar : ";
cin>>p;
cout<<"Masukkan
tinggi : ";
cin>>q;
cout<<"Volume
Kubus : "<<o*p*q/3<<endl;
}
void
volume_kerucut()
{
double r,q;
cout<<"\n-=-=-=-=-=-=-=-=-=-=-=-=-=Volume
kerucut=-=-=-=-=-=-=-=-=-=-=-=-=\n"<<endl;
cin>>r;
cout<<"Masukkan
q : ";
cin>>q;
cout<<"Volume
kerucut = "<<3.14*r*r*q/3<<endl;
}
int main()
{
volume_Kubus();
volume_kerucut();
return 0;
Sukses Terus Pak
ReplyDeleteSoftware Toko