Write a program that calculates how much an employee would


ASSIGNMENT

Write a program that calculates how much an employee would earn over a period of time (in months), if, every month, the employee' pay-per-hour rate is one dollar more than the month before (so if his starting perhour rate is 7.25, next month it will be 8.25, next month 9.25, and so on). The employee is going to work 20 hours per week, 4 weeks per month.

The program should input from the user and validate both number of months (which should be a positive integer larger than 0) and the pay-per-hour rate (which should be a floating-point number larger than $7.25 the minimum federal wage pay-per-hour rate). For each one of these values; if the value is wrong, the program should repetitively ask for that value until the value entered is correct. The program should confirm/output the correct value. See the INPUT number of months and INPUT pay-per-hour rate in the sample run table below.

The program should display/output a table (the table lines are not required) that shows for each month the employee's salary, and show the total pay at the end of the period. The output should be displayed in dollar amounts. Format your output to have a dollar sign ($) and the amount (with 2 decimals after the decimal point).

Solution Preview :

Prepared by a verified Expert
Programming Languages: Write a program that calculates how much an employee would
Reference No:- TGS01702006

Now Priced at $40 (50% Discount)

Recommended (94%)

Rated (4.6/5)