Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with the following C++ problem and a text file name ch8_Ex12Data.txt with the following info, the expected outcome should look like this

Please help me with the following C++ problem

image text in transcribed

and a text file name ch8_Ex12Data.txt with the following info,

image text in transcribed

the expected outcome should look like this

image text in transcribed

Thank you.

Write a program to help them analyze their data. Your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. Furthermore, your program must contain at least the following functions: - a function to read and store the runners' names and the numbers of miles run each day; - a function to calculate the average number of miles run each day; - and a function to output the results. (You may assume that the input data is stored in a file and each line of data is in the following form: runnerName milesDay 1 milesDay 2 milesDay 3 milesDay4 milesDay5 milesDay6 milesDay7.) \begin{tabular}{l|l|lllllll} ch8_Ex12Data.txt & & \multicolumn{4}{c}{ main.cpp } \\ \hline 1 & Jason & 10 & 15 & 20 & 25 & 18 & 20 & 26 \\ 2 & Samantha & 15 & 18 & 29 & 16 & 26 & 20 & 23 \\ 3 & Ravi & 20 & 26 & 18 & 29 & 10 & 12 & 20 \\ 4 & Sheila & 17 & 20 & 15 & 26 & 18 & 25 & 12 \\ 5 & Ankit & 16 & 8 & 28 & 20 & 11 & 25 & 21 \end{tabular} Expected Output (3) Name Day 1 Day 2 Day 3 Day 4 Day 5 Jason 10.00 15.00 20.00 25.00 18.00 20.0 Ravi 20.0026.0018.0029.0010.0012.0

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

Database And Expert Systems Applications Dexa 2022 Workshops 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 In Computer And Information Science 33

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Alfred Taudes ,Atif Mashkoor ,Johannes Sametinger ,Jorge Martinez-Gil ,Florian Sobieczky ,Lukas Fischer ,Rudolf Ramler ,Maqbool Khan ,Gerald Czech

1st Edition

3031143426, 978-3031143427

More Books

Students also viewed these Databases questions

Question

Develop successful mentoring programs. page 400

Answered: 1 week ago