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, 21.06.2019 15:30, sammuelanderson1539
Which function in spreadsheet software can be used to predict future sales or inventory needs?
Answers: 2
image
Computers and Technology, 21.06.2019 17:00, laylay120
The most efficient way to establish top best possible economize position is to measure
Answers: 1
image
Computers and Technology, 22.06.2019 04:50, edenlbarfield
Which are steps taken to diagnose a computer problem? a) reproducing the problem and using error codes b) reproducing the problem and troubleshooting c) using error codes and troubleshooting d) using error codes and stepping functions
Answers: 1
image
Computers and Technology, 23.06.2019 00:30, lilobekker5219
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
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
Mathematics, 22.04.2021 01:00