EvenOdd.java - import java.util.Scanner public class...

This preview shows page 1 out of 1 page.

import java.util.Scanner;public class EvenOdd {public static void main (String[] args) {boolean evod = true;Scanner sc = new Scanner(System.in);String a;String b;int even = 0;int odd = 0;a = ";";while (evod) { // loopif (sc.hasNextInt()) {a = sc.nextLine();int c = Integer.parseInt(a);

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture