import java.util.Scanner;
public class Bank {
public static void main(String[] args) {
// TODO Auto-generated method stub
boolean run = true;
int balance = 0;
Scanner sc = new Scanner(System.in);
while (run) {
System.out.println("-------------------");
System.out.println("1.Savings | 2. Withdrawl | 3. Balance | 4. Finish ");
System.out.println("-------------------");
System.out.println("Select>");
int num = sc.nextInt();
if (num == 1) {
System.out.println("Savings : 10000won");
} else if (num == 2) {
System.out.println("Withdrawl : 2000won");
} else if (num == 3) {
System.out.println("Balance : 8000won");
} else if (num == 4) {
run = false;
}
}
System.out.println("Finish.Goodbye");
}
}
Please check out my video on Youtube to know how I wrote the codes.
'Codes & Projects' 카테고리의 다른 글
Java) Temperature Converter (0) | 2022.09.10 |
---|---|
HTML / JSP) Multiplication table - <select> (0) | 2022.09.04 |
JSP / CSS) Log In - JavaBean, Action tags (0) | 2022.09.02 |
JSP/ Oracle) Members list (0) | 2022.08.31 |
JSP / CSS ) Sign up - JavaBean, Action tags (0) | 2022.08.31 |