Question: written C++ preferably IV. Answer each question in a separate file using your compiler. Then submit the cpp file only. Do NOT submit any other

 written C++ preferably IV. Answer each question in a separate file
using your compiler. Then submit the cpp file only. Do NOT submit
written C++ preferably

IV. Answer each question in a separate file using your compiler. Then submit the cpp file only. Do NOT submit any other files. You should also check your cpp file before submitting it using a text editor such as Notepad++. 1) Write a program that computes the earnings per shift for a security guard. A security guard charges $15 per hour before midnight and $20 after midnight. The program reads the starting time in hours and minutes and the ending time in hours and minutes. All times are between 6:00 pm, and 5:59 am, using a 12-hour clock. For example, you should consider hour 8 as 8 pm and hour 2 as 2am. I The program should check the validity of the inputs as follows. 1) Hours are from 0-11 (0 for midnight). 2) Minutes are from 0-59. 3) The start time must be before midnight. 4) The end time must be after the start time. The program should display specific warnings regarding the above when the user submits invalid input; the program should prompt the user to re-enter the times again. The program should output the total hours worked and the total earnings per shift. Example: >7h Om to 2h Om You have worked 7 hours in this shift, earning $115. 2) Write a program that calculates sin(x) using the Taylor series approximation *5 x3 sin_approx = x- + 3! + . 5! 7! A sufficient number of series terms are used such that: abs(sin_approx - sin(x)) 90 0.001 0.999843

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!