Assume we have the following three arrays. - int square[5][5]={0} , int product[5][6]; int table[5][6] = {{1,2,3,4,5},{2
Posted: Sun Jul 10, 2022 11:30 am
Assume we have the following three arrays.
- int square[5][5]={0} , int product[5][6];
int table[5][6] ={{1,2,3,4,5},{2,4,6,8,10},{20,10,5,3,1},{3,6,9,12,15}};
write a function to fill array "square" as shown below:
(find the pattern and use iterations, don't fill the arraydirectly like a[2][3]=13)
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
- int square[5][5]={0} , int product[5][6];
int table[5][6] ={{1,2,3,4,5},{2,4,6,8,10},{20,10,5,3,1},{3,6,9,12,15}};
write a function to fill array "square" as shown below:
(find the pattern and use iterations, don't fill the arraydirectly like a[2][3]=13)
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25