Write a C program to determine the amounts payable by a company to those employees who participated in its Employee Education Program. An employee is reimbursed 70% of his total tuition on courses taken. For each employee, your program must read in and process the employee number (integer) and one or more costs pertaining to courses that he participated in – note that each course has one cost (tuition) associated with it. You do not know how many courses an employee was enrolled in. Therefore, after reading in a cost and processing it, your program must ask if there are any more costs. If the response is positive, then repeat the process for the next course. After all costs for an employee have been processed, output the employee number and the amount that the company owes him (70% of the total cost) before going on to process the courses for the next employee. You do not know how many employees participated in the program. Again, after processing one employee, your program must ask if there are more employees to be processed. While this response is positive, repeat the process described above. Your program must ensure that the responses to questions pertaining to more costs or more employees are valid. Also, these responses may be in either uppercase or lowercase.
Write a C program to determine the amounts payable by a company to those
employees who participated in its Employee Education Program. An employee is
reimbursed 70% of his total tuition on courses taken. For each employee, your
program must read in and process the employee number (integer) and one or more
costs pertaining to courses that he participated in – note that each course has one cost
(tuition) associated with it. You do not know how many courses an employee was
enrolled in. Therefore, after reading in a cost and processing it, your program must
ask if there are any more costs. If the response is positive, then repeat the process for
the next course. After all costs for an employee have been processed, output the
employee number and the amount that the company owes him (70% of the total cost)
before going on to process the courses for the next employee.
You do not know how many employees participated in the program. Again, after
processing one employee, your program must ask if there are more employees to be
processed. While this response is positive, repeat the process described above.
Your program must ensure that the responses to questions pertaining to more costs
or more employees are valid. Also, these responses may be in either uppercase or
lowercase.
Step by step
Solved in 4 steps with 4 images