netoops blog

Sunday 22 September 2013

Lower_triangular_Matrix_sum

#include<stdio.h>
#include<conio.h>

void main()
{
  int arr[4][4];
  int i,j,u_sum=0,l_sum=0;
  clrscr();
  printf("\nENTER THE VALUE IN ARRAY:");
  for(i=0;i<=3;i++)
  {
     for(j=0;j<=3;j++)
scanf("%d",&arr[i][j]);
  }

  l_sum=0;
  for(i=3;i>=1;i--)
  {
     for(j=0;j<=i-1;j++)
 l_sum=l_sum+arr[i][j];
  }

  printf("SUM OF LOWER MATRIX:%d",l_sum);
  getch();
}

Tech Knowledege
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments :

Post a Comment

 
Subscribe For Free Updates!

We'll not spam mate! We promise.

Become Our Fan on Social Sites!