/*************************************
* Program TO Find The Sum *
* Of Upper And Lower *
* Trangular Matrix And Find *
* Which Sum Is Greater *
*************************************/
#include
#include
void main()
{
int i,j,row,col,upp,low,el[10][10];
clrscr();
upp=low=0;
printf("enter the size of a square matrix");
scanf("%d%d",&row,&col);
printf("Enter the elements");
for(i=0;i>>>>\n");
for(i=0;ii)
upp=upp+el[i][j];
else if(jlow)
printf("\nSum of Upper Trangular matrix is more");
else if(upp
printf("\nSum of lower trangular matrix is more");
else
printf("\nSum is equal");
getch();
}
#include
void main()
{
int i,j,row,col,upp,low,el[10][10];
clrscr();
upp=low=0;
printf("enter the size of a square matrix");
scanf("%d%d",&row,&col);
printf("Enter the elements");
for(i=0;i
for(i=0;i
upp=upp+el[i][j];
else if(jlow)
printf("\nSum of Upper Trangular matrix is more");
else if(upp
printf("\nSum of lower trangular matrix is more");
else
printf("\nSum is equal");
getch();
}
No comments:
Post a Comment