Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Úloha 15
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- char q = '"';
- System.out.println("Program ktorý ti určí či je číslo párne alebo nepárne");
- Scanner sc = new Scanner(System.in);
- int x = sc.nextInt();
- sc.close();
- int y = x % 2;
- boolean z = ( y == 0 );
- if (z) {
- System.out.println("Toto číslo je párne");
- } else {
- System.out.println("Toto číslo je nepárne");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement