Answer to Question #240564 in C++ for Joan

Question #240564

jbm manufacturing company plans to give a year end bonus to each of its employee consider the following conditions: if the employee's monthly salary is less than or equal to 2,000 pesos, the bonus is 50% of the salary for employees with salaries greater than 2,000 pesos the bonus is 1,500 pesos print the name, salary, and corresponding bonus for each employee


1
Expert's answer
2021-09-22T06:28:27-0400
#include<iostream>
using namespace std;
int main()
{
	string name;
	int salary,bonus;
	cout<<"Enter the name of the employee: ";
	cin>>name;
	cout<<"Enter the salary of the employee: ";
	cin>>salary;
	if(salary<2000)
	{
		bonus=0.5*salary;
		cout<<"Name: "<<name<<", salary is: "<<salary<<" and the bonus is: "<<bonus;
	}
	else if(salary>2000)
	{
		bonus=1500;
		cout<<"Name: "<<name<<", salary is: "<<salary<<", and the bonus is: "<<bonus;
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS