Guest User

Untitled

a guest
Apr 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. /*
  2. Wage Slip by Sean Slater
  3. */
  4.  
  5. #include<iostream>
  6. #include<iomanip>
  7. using namespace std;
  8. int main()
  9. {
  10.  
  11. const float basicPay = 12.50;
  12. const float tax = 0.25;
  13. float overtime, hours, grossPay, totalPay;
  14.  
  15. cout << "How many hours worked" "\n";
  16. cin >> hours;
  17. cout << "\n";
  18.  
  19. cout << "How much overtime" "\n";
  20. cin >> overtime;
  21. cout << "\n";
  22.  
  23. cout << "Basic Hours" << setw(20) << "Overtime Hours" << setw(10) << "Rate" << "\n";
  24. cout << hours << setw(16) << overtime << setw(23) << basicPay;
  25. cout << "\n\n";
  26.  
  27. cout << "Gross Pay" << setw(11) << "Tax" << setw(10) << "Pay" << "\n";
  28. cout << hours * basicPay + (overtime = basicPay * 1.5) << setw(15) << tax << setw(20) <<(hours * basicPay + (overtime = basicPay * 1.5))*.75;
  29.  
  30.  
  31. system("pause");
  32. return 0;
  33. }
Add Comment
Please, Sign In to add comment