Write a method called evenNumbers that accepts a Scanner reading input from a file with a series

Question:

Write a method called evenNumbers that accepts a Scanner reading input from a file with a series of integers, and report various statistics about the integers to the console. Report the total number of numbers, the sum of the numbers, the count of even numbers and the percent of even numbers. For example, if the input file contains the following text:

5 7 2 8 9 10 12 98 7 14 20 22

Then the method should produce the following console output:

12 numbers, sum = 214

8 evens (66.67%)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: