Program to find the sum of each row and each column of a matrixExplanationIn this program, we need to calculate the sum of elements in each row and each column of the given matrix. Above diagram shows the sum of elements of each row and each column of a matrix. Algorithm
SolutionPythonOutput: Sum of 1 row: 6 Sum of 2 row: 15 Sum of 3 row: 24 Sum of 1 column: 12 Sum of 2 column: 15 Sum of 3 column: 18 COutput: Sum of 1 row: 6 Sum of 2 row: 15 Sum of 3 row: 24 Sum of 1 column: 12 Sum of 2 column: 15 Sum of 3 column: 18 JAVAOutput: Sum of 1 row: 6 Sum of 2 row: 15 Sum of 3 row: 24 Sum of 1 column: 12 Sum of 2 column: 15 Sum of 3 column: 18 C#Output: Sum of 1 row: 6 Sum of 2 row: 15 Sum of 3 row: 24 Sum of 1 column: 12 Sum of 2 column: 15 Sum of 3 column: 18 PHPOutput: Sum of 1 row: 6 Sum of 2 row: 15 Sum of 3 row: 24 Sum of 1 column: 12 Sum of 2 column: 15 Sum of 3 column: 18
Next Topic#

DBMS
DS
DAA
OS
C. Network
Compiler D.
Web Tech.
Cyber Sec.
C
C++
Java
.Net
Python
Programs
Control S.