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) { String input; int num; int even = 0; int odd = 0; int i = 0; boolean loop = true; Scanner scnr = new Scanner(System.in); while (loop) { input = scnr.nextLine(); if (input.equals(";")) {

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture