#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();
}
Chat with our AI personalities
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.
It will either be a 1*23 row matrix or a 23*1 column 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.
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
The sum = 2r : where r is the row number.