Write a program that calculates the average number of days a company\'s employee
ID: 3770985 • Letter: W
Question
Write a program that calculates the average number of days a company's employees are absent. the program should have the following functions. A function called by main that asks the user for the number of employees in the company. this value should be retured as an int. (The function accepts no arguments) A function called by main that accepts one argument: The number of employees in the company. The function should ask the user to enter the number of days each employee missed during the past year. The total of these days should be returned as an int. A function called by main that takes two arguments: The number of employees in the company and the total number of days absent for all employees during the year. The function should return, as a double, the average number of days absent.(This function does not perform screen output and does not ask the user for input.)
Explanation / Answer
#include using namespace std; int inputNumberEmployees(); int inputMissedDayNumber(int employees_number); double calculateAverageMissedDaysNumber(int emplotees_number, int total_missed_day); int main() { int number_of_employees = inputNumberEmployees(); int number_missed_day = inputMissedDayNumber(number_of_employees); double average_number_day_absent = calculateAverageMissedDaysNumber(number_of_employees, number_missed_day); coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.