Question
Use Raptor program for the following problem. Write a program to process the age in years of a set of students. i. We like to
Use Raptor program for the following problem. Write a program to process the age in years of a set of students.
i. We like to be able to have the program process age values entered by a user. Ask the user for the number of students. Validate the input so that the input number is a positive number. If the number of students is not positive, allow the user to enter another number. Repeat to make sure a valid number has been entered for the number of students.
ii. For each student, ask the user for the students age in years. Do not allow the user to enter an invalid age (A number less than 1 or more than 120 is invalid). Issue an error message and allow the user to enter a valid age.
iii. Calculate and display the total age of all students in years.
iv. Find and display the lowest age value in years.
v. Find and display the highest age value in years.
vi. Calculate and display the average age for all students in years and days. Assume 365 days in a year.
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