Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions

Question

What is Aufbau's rule explain with example?

Answered: 1 week ago

Question

Write Hund's rule?

Answered: 1 week ago

Question

Know how to use reservations systems to inventory demand.

Answered: 1 week ago

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago