Advertisement
anggagmlg

Untitled

Mar 19th, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std ;
  3.  
  4. //Pass by Reference
  5.  
  6. void line(){
  7.     cout<<"======================================"<<endl;
  8. }
  9. void kelompok3(){
  10.     cout << "//////////////////////////////////////////////////////////" << endl;
  11.     cout << "// =================== Kelompok 3 ===================== //" << endl;
  12.     cout << "// ====================  X-RPL 1  ===================== //" << endl;
  13.     cout << "//////////////////////////////////////////////////////////" << endl;
  14. }
  15. void  volume_balok(int pj,int lb,int tg,int &vol){
  16.     vol = pj*lb*tg;
  17.     cout << "Volumenya di Fungsi adalah : " << vol << endl;
  18. }
  19. int main(){
  20.     int panjang,lebar,tinggi,volume = 0;
  21.     kelompok3();
  22.     cout << "Nilai Volume Awal  : " << volume << endl;
  23.     line();
  24.     cout << "Masukan Panjang    :"; cin >> panjang;
  25.     cout << "Masukan Lebar      :"; cin >> lebar;
  26.     cout << "Masukan Tinggi     :"; cin >> tinggi;
  27.     volume_balok(panjang,lebar,tinggi,volume);
  28.     line();
  29.     cout << "Nilai Volume Akhir : " << volume << endl;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement