This C Program displays the lower triangular matrix.

Here is source code of the C Program to to display lower triangular matrix. The C program is successfully compiled and run on a Linux system. The program output is also shown below.

`/*`

`* C Program to Display Lower Triangular Matrix`

`*/`

`#include <stdio.h>`

void main()

`{`

int array[3][3], i, j, flag = 0 ;

printf("\n\t Enter the value of Matrix : ");

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

`{`

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

`{`

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

`}`

`}`

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

`{`

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

`{`

if (array[i] < array[j] && array[i][j] == 0)

`{`

flag = flag + 1;

`}`

`}`

`}`

if (flag == 3)

printf("\n\n Matrix is a Lower triangular matrix");

`else`

printf("\n\n Matrix is not a lower triangular matrix");

`}`

Output: $ cc pgm15.c $ a.out Enter the value of Matrix : 1 2 0 1 0 0 0 0 0 Matrix is not a lower triangular matrix $ a.out Enter the value of Matrix : 1 0 0 1 1 0 1 1 1 Matrix is a Lower triangular matrix

**Sanfoundry Global Education & Learning Series – 1000 C Programs.**

Here’s the list of Best Reference Books in C Programming, Data-Structures and Algorithms

If you wish to look at other example programs on Matrix, go to C Programming Examples on Matrix. If you wish to look at programming examples on all topics, go to C Programming Examples.