Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std ;
- //Pass by Reference
- void line(){
- cout<<"======================================"<<endl;
- }
- void kelompok3(){
- cout << "//////////////////////////////////////////////////////////" << endl;
- cout << "// =================== Kelompok 3 ===================== //" << endl;
- cout << "// ==================== X-RPL 1 ===================== //" << endl;
- cout << "//////////////////////////////////////////////////////////" << endl;
- }
- void volume_balok(int pj,int lb,int tg,int &vol){
- vol = pj*lb*tg;
- cout << "Volumenya di Fungsi adalah : " << vol << endl;
- }
- int main(){
- int panjang,lebar,tinggi,volume = 0;
- kelompok3();
- cout << "Nilai Volume Awal : " << volume << endl;
- line();
- cout << "Masukan Panjang :"; cin >> panjang;
- cout << "Masukan Lebar :"; cin >> lebar;
- cout << "Masukan Tinggi :"; cin >> tinggi;
- volume_balok(panjang,lebar,tinggi,volume);
- line();
- cout << "Nilai Volume Akhir : " << volume << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement