Question: need this to be done in c programming use...
Question details
Need this to be done in C programming !!!
Use the code skeleton on the next page to write a C program that allows the user to create any square matrix (a 2D arrays with the same number of rows and columns), for instance, a square matrix of size 5 is a 2d array of 5 rows and 5 columns. Your main program should:

Allow the user to set the size (order) of the square matrix

Set the values of the matrix

Print the square matrix on the screen in a tabular format

Check and print if the square matrix is a magic square or not.

Check and print if the square matrix is a distinct matrix or not.

Sort the square matrix using rowwise approach.

Calculate the transpose matrix for the square matrix
Can you please provide complete main code as well
The following is the code skeleton :
#include <stdio.h> #define MAX 100 void setMatrixData(int numOfRows, int mat[][numOfRows]){ // provide the implementation } void printMatrixData(int numOfRows, int mat[][numOfRows]){ // provide the implementation } int isMagicSquare(int numOfRows, int mat[][numOfRows]){ // provide the implementation return 1; // if the matrix is a magic square } int isDistinctSquare(int numOfRows, int mat[][numOfRows]){ // provide the implementation return 1; // if the matrix has no duplicates all values are unique } void SortRowWise(int numOfRows, int mat[][numOfRows]){ // provide the implementation } void GetTranspose(int numOfRows, int mat[][numOfRows], int tran[][numOfRows]){ // provide the implementation } int main() { int matrix[MAX][MAX]; int transpose[MAX][MAX]; int numOfRows; printf("Done..."); }
A rowwise sorting for a matrix is to short each row in the input matrix in ascending order, for example, given the following:
The output will be the following a rowwise sorted matrix
Given a square matrix, the transpose of the matrix is a new matrix whose rows are the columns of the original. (This makes the columns of the new matrix the rows of the original). Here is a matrix and its transpose: