subject

Declare and define a function that computes bonus for an employee depending on the base salary and the number of years of experience of the employee. Inside the function, check the number of experience. If the number of experience is greater than 10 years, the bonus is 5% of the base salary, otherwise it is 2.5% of the base salary. You will need to call this function from your main function and pass thebase salary and the number of years as parameters/arguments. Start with the following template to write you program. #include
using namespace std;
//function declaration is provided
double compute_bonus (double base_salary, int experience);
int main()
{
double base_salary;
int experience;
//get the values of base_salary
//and experience from the user
//call compute_bonus by passing necessary parameters
//display the bonus returned by the function
return 0;
}
//function definition
/*Enter the function header here*/
{
double bonus;
//compare experience and calculate bonus
//return the computed bonus
}

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:00, 105001964
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. after the loop terminates, it prints out, on a line by itself and separated by spaces, the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even integers read, and a count of the number of odd integers read, all separated by at least one space. declare any variables that are needed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system. in); is given.
Answers: 3
image
Computers and Technology, 22.06.2019 06:00, Wolfie215
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
image
Computers and Technology, 22.06.2019 22:40, shaylawaldo11
Write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard). required: debug the disassembly code and note down the address and memory information.
Answers: 3
image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
You know the right answer?
Declare and define a function that computes bonus for an employee depending on the base salary and t...

Questions in other subjects:

Konu
History, 10.10.2019 22:20