#include <iostream.h>
#include <conio.h>
void main()
{
float p,l,t,h;
char x;
atas:
cout<<"program mencari volume"<<endl;
cout<<"============================"<<endl<<endl;
cout<<endl<<"masukkan panjang: ";
cin>>p;
cout<<endl<<"masukkan lebar : ";
cin>>l;
cout<<endl<<"masukkan tinggi : ";
cin>>t;
cout<<endl<<endl;
h=p*l*t;
cout<<"volume balok adalah "<<h<<endl;
cout<<"ingin menghitung lagi? <y/t>";cin>>x;
if (x == 'y')
{clrscr();
goto atas;}
else goto exit;
exit:
}
0 comments:
Post a Comment