#include <stdio.h> #include <math.h> int main() { int n; scanf("%d", &n); int matrix[n][n]; int count = 0, elem = 1; int top = 0, bottom = n - 1, left = 0, right = n - 1; while (count < pow(n, 2)) { for (int j = left; j <= right; j++) { matrix[top][j] = elem; elem++; ...