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. 

https://youtu.be/u0bFgQZt8Co

 

+ Recent posts