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

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!