Tính tổng của hàng và cột trong C++

Mục lục « Trước Tiếp theo »

Câu hỏi

Tìm tổng mỗi hàng, mỗi cột của ma trận cỡ m x n

Ví dụ cho đầu ra ma trận sau sẽ như thế này

Tính tổng của hàng và cột trong C++

Tổng hàng 1 = 32
Tổng hàng 2 = 31
Tổng hàng 3 = 63

Tổng cột 1 = 15
Tổng cột 2 = 16
Tổng cột 3 = 26
Sum of column 4 = 69

Mã nguồn

#include 

int main()
{
    int i, j, m, n;
    int matrix[10][20];
    int sumR, sumC;

    printf("Enter number of rows : ");
    scanf("%d", &m);
    printf("Enter number of columns : ");
    scanf("%d", &n);

    /* Input data in matrix */
    for (i = 0; i < m; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("Enter data in [%d][%d]: ", i, j);
            scanf("%d", &matrix[i][j]);
        }
    }

    printf("\n");

    /* Display the matrix */
    for (i = 0; i < m; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("%d\t", matrix[i][j]);
        }
        printf("\n");
    }

    printf("\n");

    /* Find the row-wise sum of matrix */
    for (i = 0; i < m; i++)
    {
        sumR = 0;
        for (j = 0; j < n; j++)
        {
            sumR += matrix[i][j];
        }
        printf("Sum of row %d = %d\n", i + 1, sumR);
    }

    printf("\n");

    /* Find the column-wise sum of matrix */
    for (i = 0; i < n; i++)
    {
        sumC = 0;
        for (j = 0; j < m; j++)
        {
            sumC += matrix[j][i];
        }
        printf("Sum of column %d = %d\n", i + 1, sumC);
    }

    return 0;
}

Cho một ma trận cấp m×n, nhiệm vụ là tìm tổng của mỗi hàng và mỗi cột của ma trận

ví dụ.  

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10

Tiếp cận.   

Tính tổng của hàng và cột trong C++

Tổng của mỗi hàng và mỗi cột có thể được tính bằng cách duyệt qua ma trận và cộng các phần tử

Dưới đây là việc thực hiện các phương pháp trên.   

C++




Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
52

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
53

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
54

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
55
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
56
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
57

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
58

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
59

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
0

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
1

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
2
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
3
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
5

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
6

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____24
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
9

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1521____1522
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1525

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1527
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
528

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
531

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
533

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
535

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
539

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
541

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
543
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
544

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
546____1547
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
548

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
550

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
552

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529____1554

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1537

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
558

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
2
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
560____24
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
5

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
6

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____24
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
9

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1521____1569
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1572

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1527
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
528

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
531

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
533

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
582

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
586

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
541

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
543
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
591

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
546____1547
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
548

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
550

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
552

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529____1554

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1537

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
05

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
07

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
6

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____24
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
11

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____24
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
14

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____216

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____24
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
19

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
22

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
25

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
27

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____229

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____231

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____233

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____235

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____237
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
38

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

Java




Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
40

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
53

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
42
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
43

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
44
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
45

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____158

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____249
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
51
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
52
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____249
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
57
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
52
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____21

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
49
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
2
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
3
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
67

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____26

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
72____273
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
76
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
522
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
78

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
525

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
83
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
85

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
88
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
90

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
91____1533

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
91____1535

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
539

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5200
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
544
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5202
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
547

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5204
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5205

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
552

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5209
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1537

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1558

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
49
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
2
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
560
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
67

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____26

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
72____273
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
76

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
569
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
78

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
572

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
83
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
85

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
88
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
90

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
91____1533

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
91____1582

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
586

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5200
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
591
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5259

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5204
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5261
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
547
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5205

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
552

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5209
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1537

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____205

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____15277
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
49
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
2
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5280

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____26

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5285

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4____15288
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5289
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5291

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
16

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
4
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5296
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5297
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
83
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5303

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
532
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
527
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
88
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5308

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
91
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
27

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
29

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
31

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
33

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
529
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
35

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____1537

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
537

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5322

Trăn 3




Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5323

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5324

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5325

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
42
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5327

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5328

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5329
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5330
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
52
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5332
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
52

 

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5334

Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5335
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5336

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____15338
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5330
Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
73

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____15342
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5343
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5344
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5345

 

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7____15347

Finding Sum of each row:

Sum of the row 0 = 10
Sum of the row 1 = 26
Sum of the row 2 = 42
Sum of the row 3 = 58

Finding Sum of each column:

Sum of the column 0 = 28
Sum of the column 1 = 32
Sum of the column 2 = 36
Sum of the column 3 = 40
7_______1527
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5343
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5688
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5667
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5688
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5830
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5657
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
523
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5688
Input: array[4][4] = { {1, 1, 1, 1}, 
                       {2, 2, 2, 2}, 
                       {3, 3, 3, 3}, 
                       {4, 4, 4, 4}};
Output: Sum of the 0 row is = 4
        Sum of the 1 row is = 8
        Sum of the 2 row is = 12
        Sum of the 3 row is = 16
        Sum of the 0 column is = 10
        Sum of the 1 column is = 10
        Sum of the 2 column is = 10
        Sum of the 3 column is = 10
5834

Làm cách nào để thêm hàng và cột trong C?

Thuật toán .
Bắt đầu
Khai báo mảng 2 chiều i. e. , một ma trận M*N
Khởi tạo mảng bằng hai vòng lặp for
Khai báo hai biến sẽ lưu tổng hàng và cột
Bây giờ để tính tổng hàng gọi một hàm
Giữ nguyên chỉ số đầu tiên của ma trận và tăng chỉ số thứ hai để truy cập từng phần tử của hàng

Làm cách nào để in tổng ma trận trong C?

In tổng tất cả các phần tử trong ma trận - Chương trình C .
Chương trình mảng C
Tìm các phần tử mảng tối đa và tối thiểu
Đếm tần số của từng phần tử
Chuyển đổi thập phân sang bát phân
số Armstrong trong một mảng
Tách +ve, -ve và 0s
Đảo ngược các phần tử mảng
Tổng của 10 số nguyên

Làm cách nào để thêm một cột trong C?

Mã để tạo mã này sẽ như thế nào. printf("Cột1 Cột2 Cột3\n"); printf("%7d%11d%10d\n", 100, 1221, 9348);< printf("%7d%11d%10d\n", 23, 211, 214);

Một hàng trong C là gì?

Trong C, mảng nhiều chiều được lưu trữ theo thứ tự hàng chính và các chỉ mục mảng được viết theo hàng đầu tiên (thứ tự truy cập từ điển). C. thứ tự chính của hàng (thứ tự truy cập từ điển), lập chỉ mục dựa trên số không. Địa chỉ nhà.