Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a3x3matrix of int values. Implement four functions, each expecting the matrix as parameter input. The first function must use a nested loop to prompt

Create a3x3matrix of int values. Implement four functions, each expecting the matrix as parameter input. The first function must use a nested loop to prompt a user to enter each value. Show the indices when prompting for input and populate the matrix with these values. The second functionoutputsthe matrix and formatsthe output to align all columns and rows to accommodate values up to 1000.The third function finds and returns the minimum value in the matrix. The fourth function finds and returns the maximum value in the matrix. Call each function from the main and output the minimum and maximum values returned by the third and fourth function respectively.

NOTE: PLEASE READ INSTRUCTIONS CAREFULLY BECAUSE IT NEEDS TO USE 4 FUNCTIONS.

i did the input part but i dont know how to get the matrix.

#include

using namespace std;

const int COLUMNS = 3;

void printMatrix1(int matrix[][COLUMNS], const int ROWS);

int main()

{

const int ROWS = 3;

const int COLUMNS = 3;

int matrix[3][3];

cout << "Input: " << endl;

printMatrix1(matrix, ROWS);

return 0;

}

void printMatrix1(int matrix[][COLUMNS], const int ROWS)

{

for (int row = 0; row < ROWS; row++)

{

for (int col = 0; col < COLUMNS; col++)

{

cout << "Value at " << row << "," << col << ": ";

cin >> matrix[row][col];

}

}

}

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

=+ How does the intent of the several policies differ?

Answered: 1 week ago