#include #include "matrix.h" /* Reads matrix A */ void read_matrix(float A[][N], int *ptr_n) { printf("Input the size of the matrix: "); scanf("%d", ptr_n); printf("Input the %d x %d matrix:\n", *ptr_n, *ptr_n); for (int i = 0; i < *ptr_n; i++) for (int j = 0; j < *ptr_n; j++) scanf("%f", &A[i][j]); } /* Outputs matrix A */ void output_matrix(char *statement, float A[][N], int n) { printf(statement); for (int i = 0; i < n; i++) { // output i-th row for (int j = 0; j < n; j++) // output j-th element of i-th row printf("%5.2f ", A[i][j]); printf("\n"); } }