Advertisement
Md_Touhid

URI - Problem 1009 - Salary with Bonus

Apr 13th, 2020
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip> //for setprecision()
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     string emp_name;
  9.     double fixed_salary, totalSale_per_month, bonus, total_salary;
  10.  
  11.     cin >> emp_name;
  12.     cin >> fixed_salary;
  13.     cin >> totalSale_per_month;
  14.  
  15.     bonus = (15*totalSale_per_month) / 100;
  16.     total_salary = fixed_salary + bonus;
  17.  
  18.     cout << "TOTAL = R$ " << fixed << setprecision(2) << total_salary << endl;
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement