Print elements of upper triangular matrix
Algorithm:
Step 1: Start
Step 2: Take the elements and stores in the particular arrays location.
Step 3: Apply the particular condition to show only the upper triangular element of the matrix and apply
necessary statement such as break.
Step 4: Print the upper triangular matrix.
Step 5: Stop.