Advertisement
Guest User

some gay shit

a guest
Apr 21st, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int paycode, TotalHours, Pieces, TotalManagers, TotalHourlies, TotalCommissioners, TotalPieceworkers;
  9. double pay, HourlySalary, PieceWage, WeeklySalary, WeeklySales;
  10.  
  11. while (paycode != -1)
  12. {
  13. cout << "Enter paycode (-1 to end): ";
  14. cin >> paycode;
  15.  
  16. if (paycode < 1 || paycode > 4)
  17. {
  18. cout << "You must enter a paycode between 1 and 4.";
  19. cout << endl;
  20. }
  21.  
  22. switch (paycode)
  23. {
  24. case 1:
  25. cout << "Manager selected." << endl;
  26. TotalManagers++;
  27. cout << "Enter weekly salary: ";
  28. cin >> WeeklySalary;
  29. pay = WeeklySalary;
  30. cout << "Manager's pay is $" << pay << endl;
  31. break;
  32.  
  33. case 2:
  34. cout << "Hourly worker selected." << endl;
  35. TotalHourlies++;
  36. cout << "Enter the hourly salary: ";
  37. cin >> HourlySalary;
  38. cout << "Enter the total hours worked: ";
  39. cin >> TotalHours;
  40. if ( TotalHours <= 40)
  41. pay = HourlySalary * TotalHours;
  42. else
  43. pay = (40 * HourlySalary) + (TotalHours - 40) * (HourlySalary * 1.5);
  44. cout << "Worker's pay is $" << pay << endl;
  45. break;
  46.  
  47. case 3:
  48. cout << "Commission worker selected." << endl;
  49. TotalCommissioners++;
  50. cout << "Enter gross weekly sales: ";
  51. cin >> WeeklySales;
  52. pay = (WeeklySales *.057) + 250;
  53. cout << "Commission worker's pay is $" << pay << endl;
  54. break;
  55.  
  56. case 4:
  57. cout << "Pieceworker selected." << endl;
  58. TotalPieceworkers++;
  59. cout << "Enter number of pieces: ";
  60. cin >> Pieces;
  61. cout << "Enter wage per piece: ";
  62. cin >> PieceWage;
  63. pay = Pieces * PieceWage;
  64. cout << "Pieceworker's pay is $" << pay << endl;
  65. break;
  66. }
  67. }
  68.  
  69. cout << "Employee Category Number Paid\n";
  70. cout << "Managers: " << TotalManagers << endl;
  71. cout << "Hourly Workers: " << TotalHourlies << endl;
  72. cout << "Commission Workers: " << TotalCommissioners << endl;
  73. cout << "Pieceworkers: " << TotalPieceworkers << endl;
  74.  
  75. return 0;
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement