Question: The program described below must have TWO FUNCTIONS in addition to main. YOU MAY NOT USE ALGORITHM, SSTREAM OR VECTOR. Write a program that uses
The program described below must have TWO FUNCTIONS in addition to main. YOU MAY NOT USE ALGORITHM, SSTREAM OR VECTOR.
Write a program that uses the following arrays:
empIDan array of integers to hold the employee identification number. Initialize it with:
XXXXXreplace the Xs with the last digits of your student ID
payRate an array of floats to hold the payrate for each employee.
Create a FILE with the numbers below. Read the file into the
payRate array. The rate in position is the rate for employee
etc.
Ask the user to enter an employee number and the hours that the employee worked this week Compute the wages hours times payrate and output the result. For employees that work over hours, they earn timeandahalf pay for all hours over Test with YOUR OWN employee number and hours.
Allow the user to enter another request after you output the wages until they tell you to stop. Be sure to test your own Employyee number.
Sample output:
Enter employee numbers and the hours they worked. Enter to stop the program
Enter the employee number:
Enter the hours worked:
Employee pay rate is
Employee earned:
Enter the employee number:
Sorry, no such employee
Enter the employee number
Program ending
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
