-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheg6.java
More file actions
25 lines (22 loc) · 713 Bytes
/
eg6.java
File metadata and controls
25 lines (22 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.util.*;
public class eg6 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter the salary:");
int salary = input.nextInt();
System.out.println("Enter the age:");
int age = input.nextInt();
if (salary<=20000 || age>=25){
System.out.println("Enter the loan amount:");
int loan =input.nextInt();
if(loan<=50000){
System.out.println("You are eligible for the loan");
}else{
System.out.println("Maximum loan amount is 50000");
}
}else{
System.out.println("You are not eligible");
}
input.close();
}
}