Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer me in c++ Instructions: 1- Submit.cpp file that contain all the answers of the below question Problem 1: Download the LE4.cpp file and Complete

image text in transcribed
image text in transcribed
answer me in c++
Instructions: 1- Submit.cpp file that contain all the answers of the below question Problem 1: Download the LE4.cpp file and Complete the code by answering the below questions: Write a function to print 2D array Write a function that take 2D array as parameter, the function should replace each element in the main diameter (diagonal) with zero? Printing the diagonal of array 7 9 6 4 6 8 4 3 2 9 9 9 5 1 6 2 7 4 Nom ON o con // write your name: #include #include using namespace std; //Printing Array Function //Replacing Diagonal by Zero function // int main() { const int NUM_ROWS = 5; // Number of rows const int NUM_COLS = 5; // Number of columns int i, j; int numbers[NUM_ROWS] [NUM_COLS] = {{2,7,9,6,4}, {6, 1, 8, 9,4}, {4, 3, 7, 2, 9}, {9, 9, 5, 3, 1}, {6, 2, 7, 4, 1}}; // Call pring 2D array // Call diagonal function // Call pring 2D array after replacing diagonal by zero return 0; }

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions