Question: Write a method called evenSumMax that accepts a Scanner for the console as a parameter. The method should prompt the user for a number of

Write a method called evenSumMax that accepts a Scanner for the console as a parameter. The method should prompt the user for a number of integers, then prompt the integer that many times. Once the user has entered all the integers, the method should print the sum of all the even numbers the user typed, along with the largest even number typed. You may assume that the user will type at least one nonnegative even integer. Here is an example dialogue:

How many integers? 4

Next integer? 2

Next integer? 9

Next integer? 18

Next integer? 4

Even sum = 24, Even max = 18

Step by Step Solution

3.32 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public static void evenSumMax Scanner console new Scann... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Building Java Programs A Back to Basics Approach Questions!