Modify your Age-O-Meter program so that it loops until one of the following conditions occurs:
the sentinel value of -99 is entered by the user
a total of five valid ages processed
The sentinal value must be defined as a manifest constant and it must be included in the prompt.
If a negative age other than the sentinel value is entered, then print an error message to the standard error stream and re-prompt the user to enter an age.
Prior to terminating the program, print the following:
number of valid ages entered
the sum of all the valid ages entered
the average of the valid ages entered
Be sure to protect against a divide-by-zero.
Example Output
Enter an age (-99 to exit): -5
-5 is not a valid age.
Enter an age (-99 to exit): 1
You are 1 year old and you are a baby.
Enter an age (-99 to exit): 44
You are 44 years old and you are in prime time.
Enter an age (-99 to exit): -99
# ages entered: 2
# of total years: 45
average age entered: 22.500000
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
## Platform
Windows XP