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 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 10:30
Would a ps4 wired controller work on an xbox one
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
The gene form of a trait is called a(n) 
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
question
Mathematics, 14.02.2020 00:53
question
History, 14.02.2020 00:54
question
Mathematics, 14.02.2020 00:54
Questions on the website: 13722362