Given a 2D array of integers b[r][r] where r is a given integer number. The array is already filled with integer values
Posted: Tue Jul 05, 2022 10:19 am
Given a 2D array of integers b[r][r] where r is a given integer number. The array is already filled with integer values (so do not write code to fill the array). Write C++ statements that output the diagonal values of array b as shown in the example below when r-5. If the array contains the values below, then the C++ statements will print 1;2 5;4 7;7 4;2 30; 20 1 2 3 سی 6 2 3 5 1 4 8 3 4 7 2 2 4 2 1 4 2 20 7 8 9 30 47 Note: Write efficient solution Response Feedback: what is j initial value 2 loops Wrong output (after fixing the many compilation errors) X