This is C program where user asks to trace a matrix with giving the order of matrix and print it. Here user declares variables that are mandatory for storing the value with it. Some variables are array type to holding value multiple. User asks to enter the no. of rows and columns as order of matrix. And then enters a number then after user varies the loop statement for situation handling to print a matrix. Nested loop statements are used in this program to elaborate the condition itself for tracing the matrix. A printing message for the matrix elements. And then display matrix on the screen as a result.
This is C Program that ask user to trace a matrix.
- Declaring the variable.
- Using loop statement.
- Display result on the screen.
Here is C source code for tracing a Matrix. The output of this program shown below.
printf("Enter no: of Rows : ");
printf("Enter no: of Columns : ");
printf("Enter a Number : ");
printf("\nElements are :\n");