Question
AverageAge (modified with while loop) language :Java Modify it to prompt the user for how many ages they would like to enter. Run the user
AverageAge (modified with while loop)
language :Java
Modify it to prompt the user for how many ages they would like to enter. Run the user through a while loop prompting them to enter an age for the number of times they provided. After the last age is entered, return the average age back to them. Verify that the age returned back to them displays a decimal point (double). The input of the ages should be integers - not doubles.
Verify that your loop is correct and ends appropriately. If you submit an infinite loop, you will receive zero points. Infinite loops equals not happy instructor.
Add in comments to explain what your code is doing.
You do not have to use a method for this activity.
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