C Program to find sum of all elements of each row of a matrix
belongs to collection: C language Two Dimensional (Matrix) solved programs/examples
All Answers
total answers (1)
belongs to collection: C language Two Dimensional (Matrix) solved programs/examples
total answers (1)
This C program will read a Matrix (two dimensional arrays) and print the sum of all elements of each row.
Output
Enter number of Rows :3 Enter number of Cols :3 Enter matrix elements : Enter element [1,1] : 1 Enter element [1,2] : 2 Enter element [1,3] : 3 Enter element [2,1] : 4 Enter element [2,2] : 5 Enter element [2,3] : 6 Enter element [3,1] : 7 Enter element [3,2] : 8 Enter element [3,3] : 9 1 2 3 SUM : 6 4 5 6 SUM : 15 7 8 9 SUM : 24need an explanation for this answer? contact us directly to get an explanation for this answer