Question: Note: Use Dev C++ Write a program in Ct+ using functions that enables the clerk to calculate employee gross pay based on the hours worked
Note: Use Dev C++
Write a program in Ct+ 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 getHoursWorked; 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 lours worked 50 ay rate 1 ross pay: $509.90 Press any key to continue.._ Sample output with while loop negative number to end> ours worke 50 ay rate: 28 ours worked (negative number to end aate: 6.325 75 pay 171.38 ours worked (negative number to end1 Hess any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
