Question
Ten people are preparing for an upcoming marathon. Each day of the week (7 days), each person runs a certain number of miles and records
Ten people are preparing for an upcoming marathon. Each day of the week (7 days), each person runs a certain number of miles and records the number of miles. At the end of the week, each person would like to know the number of miles they run each day, the total miles they run for the week, the average daily miles they run in that week, the maximum daily miles they run in that week, and the minimum daily miles they run in that week.
a program using arrays to help them analyze their running data according to the above requirements.
The program should contain at least the following 3 functions:
- a function to prompt the user to input the data (the runners' names and their respective numbers of miles run each day), and then read and store the data in arrays;
- a function to find the total miles run for the week, the average daily miles run, the maximum daily miles run, and the minimum daily miles run by each runner;
- a function to output the results.
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