Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ The objective of this Exercise is to learn to use a two dimensional array in a program. You will test your program with

image text in transcribedimage text in transcribedIn C++

The objective of this Exercise is to learn to use a two dimensional array in a program. You will test your program with the data input file provided for you in Blackboard. The file contains two lines of text describing the file setup Write a Ct+ program to do the following: Download the file Ex9Bdata.tct Read in the data and store it in a two dimensional array Find the sum of the values across each row Find the sum of the values across each column Find the overall sum of all the values in the array Print the array of values and also print the sums Your output should look something like this, including the dividing lines 1.0 2.0 3.0 2.5 3.0 8.0 3.0 3.0 4.0 4.5 4.5 3.0 5.0 16.0 5.0 17.0 4.017.0 6.0 10.0 12.0 14.0 50.0 You may want to refer back to Exercise 7B for a review of nested looping and indexing in a two-dimensional array. This is the output window from my program, yours should be similar, but does not need to be as detailed CL C:Windowsls exe Sunmations of a 2-D array The following data was read fro file Ex?Bdata.txt : 2-D array of data: first entry is num of rows. second entry is nun of columns renaining entries are the data values listed by rows Nunber of rows 3 Nunber of coLumns 5 Suns across rows printed on right hand side Suns across columns printed on last line Sun of all nunbers in the array printed in botton right corner 1.0 2.0 3.0 2.5 2.5 3.0 3.0 3.0 4.0 4.5 4.5 3.0 5.0 16.0 4.0 1.0 14.0 50.0 6.0 8.0 10.0 12.0 ress any key to continue .. . You may assume there are never more than 100 numbers, so you may dimension your array to ten rows and ten columns. Make sure to label everything clearly. Use one decimal place of precision. Do not alter the file provided to you. Do not read in the sums (total values). Calculate, and print them within the program code, in the rows and columns as shown

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago