Advertisement
JonathanA007

Jonathan Arya Priguna/Tugas 4

Sep 22nd, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.03 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4. int main(){
  5.     int posisiawal,posisiakhir,biayabeban,PPJ,totalbiaya,tariflistrik,pajak,totalbayar;
  6.     string nama,kelurahan;
  7.     cout<< "Program penghitung pemakaian listrik sederhana";
  8.     cout<< "Masukkan Nama";
  9.     cin>> nama;
  10.     cout<< "kelurahan";
  11.     cin>> kelurahan;
  12.     cout<< "Masukkan posisi awal";
  13.     cin>> posisiawal;
  14.     cout<< "Masukkan posisi akhir";
  15.     cin>> posisiakhir;
  16.     cout<< "Masukkan biaya beban";
  17.     cin>> biayabeban;
  18.     cout<< "Masukkan PPJ";
  19.     cin>> PPJ;
  20.     totalbiaya=posisiakhir-posisiawal;
  21.     tariflistrik=totalbiaya*biayabeban;
  22.     pajak=tariflistrik*0.1;
  23.     totalbayar=tariflistrik+pajak;
  24.  
  25.     cout<< "==================PLN Java====================";
  26.     cout<< "nama" << nama <<endl;
  27.     cout<< "kelurahan" << kelurahan <<endl;
  28.     cout<< "Pemakaian bulan ini" << totalbiaya <<endl;
  29.     cout<< "Tarif Listrik" << tariflistrik <<endl;
  30.     cout<< "PPJ 10%" << pajak <<endl;
  31.     cout<< "Total Bayar" << totalbayar <<endl;
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement