Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int salary, exp, age;
- cout<<"\n Is the person experienced ? Enter 1 for yes, 0 for no : ";
- cin>>exp;
- cout<<"\n Enter age of the person : ";
- cin>>age;
- ///{ Write your code here
- ///
- if(exp == 1 && age >=35 ){
- salary = 6000;
- }
- else if(exp == 1 && age >=28 && exp == 1 && age <=35 ){
- salary = 4000;
- }
- else if(exp == 0 || exp == 1 && age <=28){
- salary = 2000;
- }
- else {
- salary = 0;
- }
- ///}
- cout<<"\n The salary of the person is "<<salary;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement