Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Store the following data in three 2D arrays. A = -1 9 5 13 B = 7 26 -9 0 12 -17 C = 8

image text in transcribed

Store the following data in three 2D arrays. A = -1 9 5 13 B = 7 26 -9 0 12 -17 C = 8 32 16 64 25 -5 22 10 7 41 For each array, calculate the average of each column. To do that write a function with the following input: a. a 2D array of ints with two columns b. an int; this is the number of rows of the 2D array c. a double*; this is the average of the first column d. a double*; this is the average of the second column The function will have return type void and be used for each group. This function will use pointers to get the average values back to main(). This will require that these variables be defined in main() and their addresses passed to the function during the function call. DO NOT PRINT FROM THIS FUNCTION. For each array, calculate the average of all elements. To do that write a function with the following input: a. a 2D array of ints with two columns b. an int; this is the number of rows of the 2D array The function will have return type double (the average of all elements) and be used for each group. DO NOT PRINT FROM THIS FUNCTION. column average =(2.00, 11.00) Average all= 6.50 column average =(3.33, 3.00) Average all= 3.17 column average =(15.60, 28.40) Average all= 22.00

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions