Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.out.println("Podaj zakres od: ");
- Scanner s1 = new Scanner(System.in);
- int zakres_od = s1.nextInt();
- System.out.println("Podaj zakres do: ");
- Scanner s2 = new Scanner(System.in);
- int zakres_do = s2.nextInt();
- for (int i=zakres_do; i>=zakres_od;i--) {
- if (i%2==0) {
- System.out.println("Liczba " + i + " jest parzysta");
- }
- else {
- System.out.println("Liczba " + i + " nie jest parzysta");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement