Five students in college ; Mike, Abby, James, Anne, and Ali are preparing for an upcoming running competition organized by Sports Development Center in UOL. At every alternate day. They practice running in a football stadium for a certain distance and write down their time and distance covered. At the end of the week, they would like to know the number of meters runs each day, the total distance for each week, the total time they achieved as well as the furthest distance achieved. Write a c++ program that reads the data recorded by the five runners that contain the following: An array to store the names of the five runners and a two-dimensional array of five rows and eight columns of type double to store the distance and time for each runner. A function named read_data() to read data from the user and display the runner’s names and the distance (in meters) covered and the time achieved each working day. Runner’s name should be stored in a one-dimensional array of type string A function to find the total meters and time covered by each runner and the furthest distance achieved at the end of the week. The data is given to you as shown below. The data is read in sequence as follows; first input is the name of the runner, the second, fourth, sixth and the eighth columns are distance covered (in meter, e.g, 1000). The third, fifth, seventh, and ninth columns are the time taken (in second, e.g., 90) for each distance.   Sample Input:   Mike             1200    90        1700    150      2700    270      1200    120 Abby            1500    180      2800    340      1900    220      1100    90                    James          2000    260      1800    200      1000    120      1600    210 Anne         1700    200      1500    180      2100    250      2500    300 Ali               1800    220      2400    300      1600    220      2100    210   Sample Output:   Runner      Distance       Time         Distance          Time           Distance        Time          Distance        Time ------------------------------------------------------------------------------------------------------------------------------------- Mike          1200               90                1700                150                2700             270              1200               120 Abby        1500               180            2800                 340               1900             220             1100                 90 James     2000               260             1800                200                 1000            120               1600               210 Anne    1700                200              1500               180                 2100            250               2500               300 Ali          1800                 220            2400                 300                1600            220                2100               210   Runner                Total Distance                  Total Time                         Furthest Distance -------------------------------------------------------------------------------------------------------------- Mike                 6800                                    630                                      2700 Abby                7300                                    830                                      2800 James               6400                                    790                                      2000 Anne              7800                                    930                                      2500 Ali                  7900                                    950                                      2400

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter5: Working With Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 4AYK
icon
Related questions
Question
100%

Five students in college ; Mike, Abby, James, Anne, and Ali are preparing for an upcoming running competition organized by Sports Development Center in UOL. At every alternate day. They practice running in a football stadium for a certain distance and write down their time and distance covered. At the end of the week, they would like to know the number of meters runs each day, the total distance for each week, the total time they achieved as well as the furthest distance achieved. Write a c++ program that reads the data recorded by the five runners that contain the following:

  1. An array to store the names of the five runners and a two-dimensional array of five rows and eight columns of type double to store the distance and time for each runner.
  2. A function named read_data() to read data from the user and display the runner’s names and the distance (in meters) covered and the time achieved each working day. Runner’s name should be stored in a one-dimensional array of type string
  3. A function to find the total meters and time covered by each runner and the furthest distance achieved at the end of the week.

The data is given to you as shown below. The data is read in sequence as follows; first input is the name of the runner, the second, fourth, sixth and the eighth columns are distance covered (in meter, e.g, 1000). The third, fifth, seventh, and ninth columns are the time taken (in second, e.g., 90) for each distance.

 

Sample Input:

 

Mike             1200    90        1700    150      2700    270      1200    120

Abby            1500    180      2800    340      1900    220      1100    90                   

James          2000    260      1800    200      1000    120      1600    210

Anne         1700    200      1500    180      2100    250      2500    300

Ali               1800    220      2400    300      1600    220      2100    210

 

Sample Output:

 

Runner      Distance       Time         Distance          Time           Distance        Time          Distance        Time

-------------------------------------------------------------------------------------------------------------------------------------

Mike          1200               90                1700                150                2700             270              1200               120

Abby        1500               180            2800                 340               1900             220             1100                 90

James     2000               260             1800                200                 1000            120               1600               210

Anne    1700                200              1500               180                 2100            250               2500               300

Ali          1800                 220            2400                 300                1600            220                2100               210

 

Runner                Total Distance                  Total Time                         Furthest Distance

--------------------------------------------------------------------------------------------------------------

Mike                 6800                                    630                                      2700

Abby                7300                                    830                                      2800

James               6400                                    790                                      2000

Anne              7800                                    930                                      2500

Ali                  7900                                    950                                      2400

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Payback period
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning