Question: Write a program in C++ using functions that enables the clerk to calculate employee gross pay based on the hours worked by its employees. The

 Write a program in C++ using functions that enables the clerkto calculate employee gross pay based on the hours worked by its

Write a program in C++ using functions that enables the clerk to calculate employee gross pay based on the hours worked by its employees. The program has the following functions: 1. double getHours Worked(); returns the number of hours worked by the employee entered by the clerk. 2. double getPayRate(); returns the pay rate for its employee entered by the clerk. 3. double calcGross(double hours, double rate); returns the gross pay which is calculated by multiplying hours and rate. Required 1. Write the main program i.e the int main() for the program that will call the functions in order to calculate the gross pay. Declare appropriate variables in use and use correct method of calling functions. 2. Modify the above main program using a while loop so that the program repeats itself until the hours worked entered is a negative number. Sample output without while loop Hours worked : 50 Pay rate: 10 Gross pay: $500.00 Press any key to continueSample output with while loop Hours worked (negative number to end): 50 Pay rate: 10 Gross pay: $500.09 Hours worked

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 Programming Questions!