subject

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 that asks the user for the number of employees in the company. this value should be passed by reference to the function.
function prototype: void getnumemployees(int& );
• a function 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. keep track of the total number of days missed. this value should be returned as an int.
(hint: you will need a for loop)
function prototype: int totaldaysmissed(int);
• a function that takes two arguments: the number of employees in the company and the total number of days absent for all employees in the company during the year. the function should return, as a float, the average number of days absent. (no output or user input)
function prototype: float averagedaysmissed(int, int);
input validation:
• do not accept a number less than 1.
• do not accept a negative number for the days missed.

function definitions:
a) getnumemployees
b) totaldaysmissed
c) averagedaysmissed

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 24.06.2019 03:00
Click the "draw structure" button to activate the drawing utility. draw two diastereomers of (1z,4r)−1,4−dimethylcyclodecene and name them, including (e)/(z) and (r)/(s) notation. part 1 out of 4 draw the diastereomer containing a chiral center with s configuration here. window open
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 2
You know the right answer?
Write a program that calculates the average number of days a company’s employees are absent. the pro...
Questions
Questions on the website: 13722359