Page 1 of 1

C program (not C++) Assume we have the following three arrays. - int square[5][5]={0} , int product[5][6]; int table[5][

Posted: Sun Jul 10, 2022 11:30 am
by answerhappygod
C program (not C++)
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}};
The partially initialized array "table" can be viewed as a primitive spreadsheet, in which the last column and
bottom row have been left blank. Write the code to fill in this row and column with the totals of each column, each row , and the grand total.
1 2 3 4 5 ?
2 4 6 8 10 ?
20 10 5 3 1 ?
3 6 9 12 15 ?
? ? ? ? ?