Advertisement
amrulHarahap

Volume Balok

Dec 19th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. // Program Menentukan Volume Balok
  2. // Task No.2 file 066-P02.pptx
  3. // Amrul Mubarak Harahap
  4. // 19T03 - 1901098
  5.  
  6. #include <iostream>
  7. using namespace std;
  8.  
  9. int main(){
  10.     float p, l, t, rumus;
  11.  
  12.     cout << "===============================" << endl;
  13.     cout << "Program Menghitung Volume Balok" << endl;
  14.     cout << "===============================" << endl;
  15.    
  16.     cout << "Masukkan panjang : "; cin >> p;
  17.     cout << "Masukkan lebar   : "; cin >> l;
  18.     cout << "Masukkan tinggi  : "; cin >> t;
  19.  
  20.     rumus = p*l*t;
  21.  
  22.     cout << "Volume balok dengan panjang = " << p << " cm, lebar = " << l
  23.     << " cm \ndan tinggi = " << t << " cm adalah " << rumus << " cm^3" << endl << endl;
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement