Advertisement
fiqriachmada

KeuntunganBungaTedyUsingCoutCin

Nov 5th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int M, N;
  8.     float pajak, totalkeuntungan;
  9.     double keuntunganM,keuntunganN;
  10.  
  11.     cout << "M : ";
  12.     cin >> M ;
  13.     cout << "N: ";
  14.     cin >> N ;
  15.  
  16.  
  17.     keuntunganM = M*235;
  18.     keuntunganN = N*241;
  19.     totalkeuntungan = keuntunganM+keuntunganN;
  20.     pajak = totalkeuntungan*0.01;
  21.  
  22.  
  23.     cout << "Total keuntungan bunga Anggrek : " << keuntunganN <<endl;
  24.     cout << "Total keuntungan bunga Mawar : " << keuntunganM <<endl;
  25.     cout << "Total keuntungan :" << totalkeuntungan <<endl;
  26.     cout << "Pajak yang harus dibayar : " << pajak << endl;
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement