-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThe_Royal_Bank_of_Java.java
46 lines (39 loc) · 1.57 KB
/
The_Royal_Bank_of_Java.java
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Prajeet Bohara
* 12/14/2023
* P4: The Royal Bank of Java
*/
import java.util.*;
public class The_Royal_Bank_of_Java {
public static void main(String[] args) {
Scanner inscan = new Scanner (System.in);
System.out.println("\n****ROYAL BANK OF JAVA****");
System.out.println("Are you here to get a mortgage? (yes or no)");
String mortgage = inscan.nextLine();
if (mortgage.equals("yes")){
System.out.println("How much do you have in your savings?"
+ "How much do you owe in credit card?");
int savings = inscan.nextInt();
int credit = inscan.nextInt();
if (savings >= 10000 && credit < 5000){
System.out.println("How many years have you worked for?");
int time = inscan.nextInt();
if(time > 2){
System.out.println("What is your name?");
inscan.nextLine();
String name = inscan.nextLine();
System.out.println("Congratulations! "+name+", you have been approved!");
}
else{
System.out.println("OK! Thanks for stopping by. Have a nice day!!");
}
}
else{
System.out.println("OK! Thanks for stopping by. Have a nice day!!");
}
}
else{
System.out.println("OK! Thanks for stopping by. Have a nice day!!");
}
}
}