Question
A few people are preparing for an upcoming marathon. Each day of the week, they run a certain number of miles and write them into
A few people are preparing for an upcoming marathon. Each day of the week, they run a certain number of miles and write them into a notebook. At the end of the week, they would like to know the number of miles run each day, the total number of miles for the week, and average miles each day. Write a program to help them analyze their data. Your program must contain parallel arrays: an array to store the names of all the runners, a two dimensional array of 50 rows and 7 columns to store each runners miles per day, and array of 50 elements to store the total miles ran for the week for each runner, and an array of length 50 to store the average miles per day for each runner. You will need the following functions void readRunnerData ( string names [] , int miles [][7] , int & numRunners ); int totalMilesRan (int miles [][7] , int runnerIndex ); double averageMilesPerDay (int miles [][7] , int runnerIndex ); void outputResults ( string names [] , int miles [][7] , int totalMiles [] , double average [] , numRunners );
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