Question: Write a C++ program to implement a function named Avg, the function receives 2-D array of integers, the number of rows, and the number of

 Write a C++ program to implement a function named Avg, the

Write a C++ program to implement a function named Avg, the function receives 2-D array of integers, the number of rows, and the number of columns. This function prints the average of the second diagonal in the 2D array as shown in the figure below. void Avg (int a[][3], const int r, const int c); 1 18 8 Example The function will print: 8 (8+7+9)/3 60 9 20 7 10 7 ho In your main do the following: Create 2-D array of integer of size (3x 3) and initialize it as in the figure above. Call Avg Function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!