Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- Scanner sc = new Scanner (System.in, "Windows-1250");
- System.out.println(" Zadaj tvoju oblubenu farbu pre pokracovanie: ");
- String farba = sc.nextLine();
- String modra = "modra";
- String y = "y";
- if (farba.equals(modra)) {
- System.out.println(" pre pokračovanie programu ak suhlasiš napíš y");
- String moznost = sc.nextLine();
- if(moznost.equals(y)) {
- System.out.println("Spravne :) ");
- } else {
- System.out.println("zle :( ");
- System.exit(0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement