Write a C++ program to print the lower and upper triangles of a square matrix

Write a C++ program to print the lower and upper triangles of a square matrix.

Output

C++ lower and upper triangles of a square matrix
C++ lower and upper triangles of a square matrix