Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args)
- {
- int euro = 0;
- boolean exit = false;
- Scanner cin = new Scanner(System.in);
- while(exit != true)
- {
- System.out.println("\t\tBank\n");
- System.out.println("1 - Положить деньги на счёт в евро");
- System.out.println("2 - Положить деньги на счёт в долларах");
- System.out.println("3 - Положить деньги на счёт в рублях");
- System.out.println("4 - Вывести на экран сумму счетов");
- System.out.println("5 - Перевести деньги с евро в доллары");
- System.out.println("6 - Перевести деньги с евро в рубли");
- System.out.println("7 - Перевести деньги с долларов в евро");
- System.out.println("8 - Перевести деньги с долларов в рубли");
- System.out.println("9 - Перевести деньги с рубли в евро");
- System.out.println("10 - Перевести деньги с рубли в доллары");
- System.out.println("11 - Выход из банка");
- int answer = cin.nextInt();
- switch(answer)
- {
- case 1:
- {
- System.out.println("Введите деньги в евро:");
- euro = cin.nextInt();
- break;
- }
- case 2:
- {
- System.out.println("Введите деньги в долларах:");
- euro = cin.nextInt();
- break;
- }
- case 11:
- {
- exit = true;
- }
- }
- }
- cin.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement