good day every one ..!!
Could you please discuss this example with me ??
A 4-by-4 array of integers. Write a C++ program to accomplish each of the following operations:
a. Declare the above array.
b. Read the array.
c. Find and print the sum of odd elements in the main diagonal of the array.
d. Replace each zero in the array by 1.
You have an array. In this array there are 4 arrays. In each of those 4 arrays, there are 4 int elements. I assume you know how to read in a single value? And just try to think hard - what do you do when you want to do the same thing with slight modifications many times in a row?