(Solved) : Imir Programs Wk3 Earnings Write Program Computes User S Total Pay One Week User Prompted Q43998046 . . .
resolve it pleasewhat is wrong with my codes?






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 << “EARNNGn”; cout << “You will be asked to enter how many hours you workednand your hourly rate of pay. The number of hours must be greater than zero and less than or equal to 68. Inn”; cout << “How many hors did you work? n”; std::cin>> hours; 11 hours 11 hours<=60) term aser -/call / w arnings > 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 << “That 13 an lavalld number of pay rate. In the program again. m cout << “what is your rate of pay? n”; std::cin>> pay ate; if (payitates 1011 paylate <= 60) MJ earnings. p:37:13: GETTI expected before “cout cout << “That is an invalid umber of hours. Run the progress again. : Il do the math – process earnings bus payRate; cout << se precision (2) cout << fixed <Showpoint; cout << “Your total pay is $*<cearnings, M user -/60161203_earning > sudo – eam Mk3_earniaga.cp earings. In function ist sino’s Seaming.c :33:9: error: expected before out” cout << “That is an invalid number of pay rate. Run the progres again. else if cout << “That is an invalid amber of pay rate. But the program Seaming.cp:37:13: error: expected before cost cout << “That is an invalid under of hours. Run the program again. else if cout << “That is an invalid again. In”: amber of hours. Run the program userie -c16120/ _emings > 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 << “EARNNGn”; cout << “You will be asked to enter how many hours you worked nand your hourly rate of pay. The number of hours mustnbe greater than zero and less than or equal to 60. inn”; cout << “How many hours did you work? n”: std::cin >> hours; if (hours> 11 hours<=60) cout << “What is your rate of pay? n”; std::cin >> payRate; if (payRate>= 10|| payRate <= 60) Il do the math – process earnings = hours * payRate; cout << setprecision(2); cout << fixed << showpoint; cout << “Your total pay is $ “<<earnings; 29 else if cout << “That is an invalid number of pay rate. Run the program again. In”; else if cout << “That is an invalid number of hours. Run the program again.n”; 39 40 return ; 42 } Show transcribed image text 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 sudo H ear w3_earnings.pp eaming. In function ‘int mino’: eaming. 19 errori expected before ‘out’ cout
Expert Answer
Answer to IMIR PROGRAMS Wk3 earnings Write a program that computes the user’s total pay for one week. The user should be prompted …
OR