Question: creaate a java program. Get the user inputs in the main method then pass them to a method you can define,calculaye the loan and return
Ask the user to enter the annual salary and years of experience (yox) of an employee. The program checks the salary if its greater than $50000, the program checks if yox is greater than 10 , a loan of $5000 is given, otherwise, a loan of $4000 is given. However, if the salary is greater than $4000e, a loan of $3000 is given, otherwise no loan is given. /luse the scanner to get the salary and yox from the user. //decalre loan variable as double if (salary > se00e) if ( yox >10) else loan =5000; loan=4000; else if (salary > 40000) loan =3000; else loan =0.0; System, out.println("The loan given is: " + loan)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
