SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to print upper triangular matrix
C program to print upper triangular matrix
Output:
Enter the elements of the matrix:
1 2 3
0 4 5
0 0 6
The entered matrix is Upper triangular matrix
Implementation:
#include
#define r 3 //change the row size here #define c 3 //change the column size here enum bool{false,true}; int main(void) { int a[r][c]; int i,j; enum bool flag=false; printf("Enter the elements of the matrix:\n"); for(i=0;i
row index for all the elements below the main diagonal, row index > column index for all the elements in the main diagonal, row index = column index */ for(i=0;i
PREVIOUS
NEXT
HOME