3

include

int main(){
int i,j,r,c,f=0;
printf(“Enter the no of rows and columns:\n”);
scanf(“%d%d”,&r,&c);

int m[r][c];
printf("Enter the elments of matrix:\n");
for(i=0;i<r;i++){
    for(j=0;j<c;j++){
        scanf("%d",&m[i][j]);
    }
}

  for(i=0;i<r;i++){
    for(j=0;j<c;j++){

        if(i<j && m[i][j]!=0){
                f=1;
                break;
            }


    }
}

if(f==0){
printf(“Lower Triangular\n”);

}
else{

printf("Not a Triangular martix");

}
return 0;
}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *