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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
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
question
Mathematics, 19.05.2021 07:30
question
Mathematics, 19.05.2021 07:30
question
Mathematics, 19.05.2021 07:30
question
Mathematics, 19.05.2021 07:30
Questions on the website: 13722367