## if else

Report
Question

### Please briefly explain why you feel this question should be reported .

Take an employee’s number of years of experience and their age and decide how much raise should be given to them in their salary. The condition is that if an employee’s experience is less than 3 years and his age is less than 40, he gets 20% raise, if their experience is less than 5 years and their age is less than 40, they get 30%, and if their experience is more than 7 years and their age is more than 40, they get 50% raise

in progress 1
Java 4 months 2 Answer 675 views 0

1. ### Please briefly explain why you feel this answer should be reported .

Please do not ask questions without code if you seek code in answer. Show us what you have written.

2. ### Please briefly explain why you feel this answer should be reported .

public class Exercise38 {

public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int yearsOfExperience = 0;
long salary = 45000;
System.out.print(“Input yearsOfExperience: “);
yearsOfExperience = scan.nextInt();
int age = 0;
System.out.print(“Input age: “);
age = scan.nextInt();

if(yearsOfExperience < 3 && age < 40)
{
salary = salary + ((salary * 20)/100) ;
}
System.out.print("Experience:"+yearsOfExperience + ",age:"+age + ",salary" + salary);
}
}

I have solved only one condition , you can easily solve rest of the conditions