answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int i,a[3][3]={1,2,3,4,5,6,7,8,9},j,s=0,m,n;

clrscr();

/*for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf("\na[%d][%d]= ",i,j);

scanf("%d",&a[i][j]);

}

}*/

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf("%d",a[i][j]);

}

printf("\n\n");

}

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

s=s+a[i][j];

printf("\n Sum of %d`th row=%d",i+1,s);

s=0;

}

{

int i,j,s=0;

for(j=0;j<3;j++)

{

for(i=0;i<3;i++)

s=s+a[i][j];

printf("\n\t\t Sum of %d`th column=%d",j+1,s);

s=0 ;

}

}

getch();

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: Find sum of elements row wise and columm wise?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Math & Arithmetic

Why do the rows double in the pascal's triangle when you add them up?

Each element of a row of pascal's triangle is the sum of the two elements above it. Therefore when you some the elements of a row, each of the elements of the row above are being summed twice. Thus the sum of each row of pascal's triangle is twice the sum of the previous row.


How to construct a matrix with 23 elements?

It will either be a 1*23 row matrix or a 23*1 column matrix.


What is the determinant of a matrix?

A determinant is defined for square matrices only.To find the determinant of the matrix you need to:find all n-tuples of elements of the matrix such that each row and each column of the matrix is represented.calculate the product of the elements.calculate the sign for that term. To see how this is done, see below.calculate the sum of the signed products: that is the determinant.To calculate the sign for the product of the n-tuple, arrange the elements in row order. Swap the elements, two at a time, to get them in column order. If the number of swaps required is even then the product is assigned a positive sign, and if odd then a negative sign.


How do you find the LCM of 6 and 9?

To find the LCM: write in 2 rows multiples of 6 (top row) and multiples of 9 (bottom row) and find the same number in both rows. 18 is in both rows, so 18 is the LCM of 6 and 9.6.12.18.249.18.27.36


Can you find a pattern to connect the row with it's sum Row- 0 1 2 3 4 5 6 Sum- 1 2 4 8 16 32 64?

The sum = 2r : where r is the row number.