ardiansyahiswan

Untitled

Mar 17th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. float pemakaian, air, total;
  7. cout<<"\t------------------------------------------------\n"<<endl;
  8. cout<<"\t----------Pembayaran Pemakaian Air PDAM----------\n"<<endl;
  9. cout<<"\t------------------------------------------------\n"<<endl;
  10. cout<<"\Masukan Tarif PDAM n3 =";
  11. cin>>air;
  12.  
  13. if((air>0)&&(air<=10))
  14. {pemakaian=air*2000;}
  15. if((air>=11)&&(air<=20))
  16. {pemakaian=air*3000;}
  17. if((air>=21)&&(air<=30))
  18. {pemakaian=air*4000;}
  19. if((air>=31))
  20. {pemakaian=air*5000;}
  21. total = pemakaian + 10000;
  22.  
  23.  
  24. cout<<"\t---------------------------------------\n"<<endl;
  25. cout<<"\nBiaaya Administrasi : 10000"<<endl;
  26. cout<<"\t----------------------------------------\n"<<endl;
  27. cout<<"Total Biaya : "<<total<<endl;
  28.  
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment