Di bawah ini adalah source code untuk menghitung volume balok.
/*— copy here —*/
// A. Program menghitung Volume Balok
#include “iostream.h”main ()
{
float Panjang, Tinggi, Lebar, Volume;
cout<<” Masukkan Panjang “;
cin>>Panjang ;
cout<<” Masukkan Lebar “;
cin>>Lebar;
cout<<” Tinggi “;
cin>>Tinggi;
Volume=Panjang*Tinggi*Lebar;
cout<<“Volume= “;
cout<<Volume;
return 0;
}
—Selamat Mencoba—