Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started