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 12:00
Which of the following does 3d animation create an illusion of on the screen? a. depth b. emotion c. length d. dialogue
Answers: 1
question
Computers and Technology, 22.06.2019 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
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, 28.10.2020 17:10
Questions on the website: 13722363