-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloaneligible.java
More file actions
27 lines (25 loc) · 830 Bytes
/
Copy pathloaneligible.java
File metadata and controls
27 lines (25 loc) · 830 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
26
27
import java.lang.System;
import java.util.Scanner;
class loaneligible{
public static void main (String[] args){
Scanner scan=new Scanner(System.in);
System.out.print("Enter your Salary: ");
double sal=scan.nextInt();
System.out.print("Enter your age: ");
int age=scan.nextInt();
if(sal>=20000 || age<=25){
System.out.println("Eligible for loan");
System.out.print("Enter your loan amount: ");
int loanamt=scan.nextInt();
if (loanamt<=50000){
System.out.print("Loan available");
}
else{
System.out.print("Maximum loan amount is 50,000");
}
}
else{
System.out.print("Not eligible");
}
}
}