-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoop.java
More file actions
33 lines (28 loc) · 958 Bytes
/
Loop.java
File metadata and controls
33 lines (28 loc) · 958 Bytes
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
package start;
import java.util.Scanner;
public class Loop {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int key = -1;
while (key != 0) {
System.out.println("Co chcesz zrobić :\n (1) Zadanie1 \n (2) Zadanie2 \n (3) Zadanie3 \n (0) Wyjście");
key = scanner.nextInt();
switch (key) {
case 1:
System.out.println("Rozwiązanie zadania 1");
break;
case 2:
System.out.println("Rozwiązanie zadania 2");
break;
case 3:
System.out.println("Rozwiązanie zadania 3");
break;
case 0:
System.out.println("Wyjście");
break;
default:
System.out.println("Zły wybór!");
}
}
}
}