Question: in java Write a program that finds the average of three integers: evenNum 1 , evenNum 2 , and oddNum. As you might have guessed,
in java Write a program that finds the average of three integers: evenNum evenNum and oddNum. As you
might have guessed, make two of the integers even numbers, and one an odd number.
Have your program:
Prompt the user for an even number; store the number in evenNum
Prompt the user for another even number; store the number in evenNum
Prompt the user for an odd number; store the number in oddNum.
Calculate the sum of the three numbers and save result in an integer variable called sum.
Use sum to calculate the average of the three numbers and store the result in an integer
variable called avg.
Output the phrase:
The average of evenNum evenNum and oddNum, is avg.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
