Pia tunatoa huduma zifuatazo.

Tunatengeneza blogu, tovuti(website), youtube chaneli n.k.. Mawasiliano:
simu:+255763670000, Barua pepe: khalfanm021@gmail.com

Saturday, September 15, 2018

Question 5: Write c++ program check if the employee is eligible for bonus or not


Question 5: The current year and the year in which the Songea Teachers College employee joined the institution entered through the keyboard. if the number of years for which the employee has saved the college is greater than 10years,then the bonus of Tsh.250,000/= is given to the employee. if the years of the service is not greater than 10year,then the program should not do anything
Write c++ program check if the employee is eligible for bonus or not

Solution

#include<iostream>
using namespace std;
int main(){
int a,b,d;
cout<<"Enter the current year\n";
cin>>a; /*a implies the current year*/
cout<<"Enter the year an employee joined the institution\n";
cin>>b; /*b implies the year of joining the institution*/
d = a - b; /*Gets the difference of two years*/
if(> a){
cout<<"The current year cannot be less than the year in which an employee joined the institution\n";
}else{
if(>= 10){
cout<<"\nAn employee is eligible for the bonus of Tsh.250,000/=\n";  
}else{
cout<<"\nAn employee is not eligible for the bonus of Tsh.250,000/=\n";  
}
}
return 0;
}


PLEASE LEAVE A COMMENT, OR ANY OTHER QUESTIONS INVOLVING ANY OF THE FOLLOWING LANGUAGES, C++, PHP, JAVASCRRIPT, HTML, CSS, MYSQL

2 comments:

  1. Replies
    1. Ok! Welcome back for more solved questions, and even if you have just post it

      Delete