Question: resolve it please what is wrong with my codes? IMIR PROGRAMS Wk3 earnings Write a program that computes the user's total pay for one week.






IMIR PROGRAMS Wk3 earnings Write a program that computes the user's total pay for one week. The user should be prompted to enter the number of hours worked and the hourly rate of pay (both are floating point numbers). if the number of hours input is less than or equal to 0 or greater than 60. a message should appear, saying that the number of hours entered is not valid If the rate of pay entered is less than 10.00 or greater than 60.00. a message should appear, saying that the rate of pay entered is not valid Total earnings are computed by multiplying the hours times the rate of day. However, if the number of hours is greater than 40. over time is paid at the rate of 1.5 times the hourly rate for the hours over 40 treguar rate for the hours less than 4OL To avoid having a very long equation for the overtime computation declare another floating point variable to hold the number of hours over 10 Output should show the total canings formatted to 2 places after the decimal point. SAMPLE PROGRAM RUNS: SARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must e greater than zero and less than or equal to se. The rate of pay must be greater than or equal to $10.00 and less than or equal to s60.00. How many hours did you work? 10 What is your rate of gay 12 SAMPLE PROGRAM RUNS: EP15S You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hour's must be greater than zero and less than or equal to 6e. The rate of pay must be greater than or equal to sie.ee and less than or equal to $60.ee. How many hours did you work? 70 What is your rate of pay? 12 That is an invalid number of hours. Run the program again. EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 60, The rate of pay must be greater than or equal to $1e.ee and less than or equal to $60.ee. How many hours did you work? 40 what is your rate of pay? se That is an invalid pay rate. Run the progran again. EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 6e. The rate of pay must be greater than or equal to $1e.ee and less than or equal to $60.ee. How many hours did you work? 10 What is your rate of pay? 25 Your total pay is $ 250.ee EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 60. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.00. How many hours did you work? se How many hours did you work? 78 hat is your rate of pay? 12 That is an invalid number of hours. Run the program again, EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 6e. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.ee. How many hours did you work? 40 what is your rate of pay? 8e That is an invalid pay rate. Run the program again. EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 60. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.ee. How many hours did you work? 10 what is your rate of pay? 25 Your total pay is $ 250.ee EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 6e. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.00. How many hours did you work? 50 What is your rate of pay? 20 Your total pay is $ 1300.00 Upload Submit MARIA KARAM Gwk3_earnings.cppo 100 17 declare variables noat hours: float paykate, earning 17 assign values or get input from user cout > hours; 11 hours 11 hours Bude ++ - md wildlib.FP od. gel errori Wil_adlin.pl No Fuch file or directory asera ti -/8161420/ 3_earnings > Fudo g++ adwki_madlib. p > od .. ge1 errori uki_fadlib.cppi No such file or directory serimi /c816120/ caringa > sudo g' * can earning. PP Vusr/11b/gcc/86_64-110ux-gnu//../../../N06_64-11nux-ga/Sert1.01 in function Latarti (.textx20): undefined reference to ain' collect21 FTOFI Id returned 1 exit status eriti -/calcima/ w earnings > sudo H ear w3_earnings.pp eaming. In function 'int mino': eaming. 19 errori expected before 'out' cout > pay ate; if (payitates 1011 paylate sudo - eam Mk3_earniaga.cp earings. In function ist sino's Seaming.c :33:9: error: expected before out" cout Activate Windows Go to Settings to activate Windo TOPM A . de ING wk3 earnings Write a program that computes the user's total pay for one week. The user should be prompted to enter the number of hours worked and the hourly rate of pay (both are floating point numbers). If the number of hours input is less than or equal to 0 or greater than 60. a message should appear, saying that the number of hours entered is not valid. If the rate of pay entered is less than 10.00 or greater than 60.00, a message should appear, saying that the rate of pay entered is not valid. Total earnings are computed by multiplying the hours times the rate of pay. However, if the number of hours is greater than 40 over time is paid at the rate of 1.5 times the hourly rate for the hours over 40 (regular rate for the hours less than 40). To avoid having a very long equation for the overtime computation declare another floating point variable to hold the number of hours over 40. Output should show the total earnings, formatted to 2 places after the decimal point. SAMPLE PROGRAM RUNS: EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must pe greater than zero and less than or equal to 60 The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.00. low Bany hours did you work? 70 What is your rate of pay? 12 That is an invalid number of hours. Run the program again. EARNINGS I l be asked to enter how many hours you worked number of hours must V I LNUVOTUITC/SECUNeill.jsp:Luulse -3405 TOLE SAMPLE PROGRAM RUNS: EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 68 The rate of pay must be greater than or equal to $10.ee and less than or equal to $68.08. How many hours did you work? 70 What is your rate of pay? 12 That is an invalid number of hours. Run the program again. EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 60. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.ee. How many hours did you work? 4e What is your rate of pay? se That is an invalid pay rate. Run the program again. EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 6e. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.ee. How many hours did you work? 10 What is your rate of pay? 25 Your total pay is $ 250.ee EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to be The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.00. EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 60. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.00. How many hours did you work? 10 What is your rate of pay? 25 Your total pay is $ 250.00 EARNINGS You will be asked to enter how many hours you worked and your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 60. The rate of pay must be greater than or equal to $10.00 and less than or equal to $60.00. How many hours did you work? 50 What is your rate of pay? 20 Your total pay is $ 1300.00 de.mimir.io/# wk3_ea class.mi Find Help mk3_earnings.cpp // declare variables float hours; float payRate, earnings; // assign values or get input from user cout > hours; if (hours> 11 hours> payRate; if (payRate>= 10|| payRate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
