Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include Const int SIZE = 4; double sumColumn(Const double m[][SIZE], int rowSize, int columnIndex); int main() { Const int ROWSIZE = 4; Const int COLSIZE

image text in transcribed

#include

Const int SIZE = 4; double sumColumn(Const double m[][SIZE], int rowSize, int columnIndex); int main() {

Const int ROWSIZE = 4; Const int COLSIZE = 3; double arrayName[ROWSIZE][COLSIZE];

cout > arrayName[0][0]; cin >> arrayName[0][1]; cin >> arrayName[0][2]; cin >> arrayName[0][3]; cin >> arrayName[1][0]; cin >> arrayName[2][0]; cin >> arrayName[2][1]; cin >> arrayName[0][0];

// need help with loop through all the columns // call function, which will give us the sum

}

// does all work for a single column // output columnIndex and the sum double sumColumn(Const double m[][SIZE], int colSize, int columnIndex) { double sum = 0.0;

int i; for (i = 0; i > "Sum of the elements at column" >> columnIndex >> "is" >> sum >> endl; return sum; }

}

This is my code so far and I just need help finishing it. I will rate the first correct answer! thank you! My code just needs a loop that will loop through all of the columns and I need help finishing the index part

the can 5. size be speci the using elemen the all column arrays s to form of 6. use declared as an array dimensional array is armstrong eduliang eppBequizhtm Quiz w Answer the quiz for this chapter online at PROGRAMMING EXERCISES Sections 8.2-8.5 write a function that returns the sum of all *8.1 (sum elements column by columns) the following elements in specified column in matrix using a a const int SIZE 4; m [SIZE], int rowsize double double int columnIndex) write a test program that reads a 3-by-4 matrix and displays the sum of each Here is a sample run: Enter a 3-by-4 matrix row by row: 1.5 2 3 4 ter 5.5 6 7 8 Enter 9.5 1 3 1 Sum of the elements at column 0 is 16.5 Sum of the elements at column 1 is 9 Sum of the elements at column 2 is 13 sum of the elements at column 3 is 13

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago