-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAtm.java
30 lines (27 loc) · 804 Bytes
/
Atm.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
import java.util.Scanner;
public class Atm {
private static Scanner sc;
public static void main(String[] args) {
sc=new Scanner(System.in);
int n;
System.out.println("------------ATM-------------");
do{
System.out.println("Enter 1 for Admin Login");
System.out.println("Enter 2 for User Login");
System.out.println("Enter 3 to Exit");
n=Integer.parseInt(sc.nextLine());
if(n==1){
Admin.adminLogin();
}
else if(n==2){
User.userLogin();
}
else if(n==3){
System.exit(0);
}
else{
System.out.println("Invalid Input !");
}
}while(n!=3);
}
}