Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2D Arrays - C++ Label all outputs 1. Read in data for a 15 x 15 2d array (data found here: http://pastebin.com/ULxttRtv) 2. Print Array

2D Arrays - C++ Label all outputs

1. Read in data for a 15 x 15 2d array (data found here: http://pastebin.com/ULxttRtv) 2. Print Array 3. Compute and print average for all values in the 2-d array 4. Compute and print totals for each row for rows 5 through 10 5. Compute and print totals for each column for columns 2 through 8 6. Find the biggest numbers in each odd numbered rows. 7. Find the smallest number in each even numbered columns. 8. Sum all the values for columns 7 through 12 (one number answer) 9. Sum all the values for rows 10 through 14 (one number answer) 10. Sum together the biggest numbers from each column 2 through 8 (one number) 11. Sum together the smallest numbers from each row 0 through 6 (one number) 12. Find the four adjacent numbers that sum to the largest sum in the array. (Four adjacent numbes can be in a row, column, or one of the diagonals (8 possible directions)

Restrictions: Can only use these functions - 1. A readIn function to read the values into the 2-d array (fill columns, then rows) 2. A RowTotal function that accepts the 2d array, an integer (row) and returns the total for that row. 3. A ColTotal function that accepts the 2d array, an integer (column) and returns the total for that column. 4. A HighestInRow function that accepts the 2d array, row nbr returns the highest number in the row. 5. A HighestInCol function that accepts the 2d array, col nbr returns highest number in column. 6. A LowestInRow function that accepts the 2d array, row nbr returns the lowest number in the row. 7. A LowestInCol function that accepts the 2d array, col nbr returns lowest number in column. 8. A Print function that reads the array one row per line. 9. Write a function (or functions) that will find the 4 adjacent numbers (horizontal, vertical, or diagonal) in the array that sums to the largest value. The four numberes have to be adjacent values in one of 8 directions.

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 Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

Were members encouraged to participate?

Answered: 1 week ago