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: evenNum1, evenNum2, and oddNum. As you
might have guessed, make two of the integers even numbers, and one an odd number.
Have your program:
1. Prompt the user for an even number; store the number in evenNum1.
2. Prompt the user for another even number; store the number in evenNum2.
3. Prompt the user for an odd number; store the number in oddNum.
4. Calculate the sum of the three numbers and save result in an integer variable called sum.
5. Use sum to calculate the average of the three numbers and store the result in an integer
variable called avg.
6. Output the phrase:
The average of evenNum1, evenNum2, and oddNum, is avg.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!