Printing concentric squares of numbers
Use a bit more spaces. It will make your code more readable.
Try to be coherent with your indents
You should sanitize input. What happen if user enter a number greater than 9 ? Or 0, 1, or 2? Or negative number? Or not a number? Never trust user, They all try to broke your program.
When you just print on char, prefer putchar() instead of printf().


Here's my solution, maybe not the most optimal, but clean and short. I compute the distance from the current coordinate to nearest side and then remove it to the base number.

#include &lt;stdio.h&gt;
int main(void) {
    int n = 5;
    int a;
    int b;
    const int m = 2*n-1;
    for (int i = 0; i &lt; m; ++i) {
        for (int j = 0; j &lt; m; ++j) {
            a = (i &gt;= n) ? m - i - 1: i;
            b = (j &gt;= n) ? m - j - 1 : j;
            putchar('0' + n - ((a &lt; b) ? a : b));
        }     
        putchar ('\n');
    }
    return 0;
}


To improve this, you could split the inner loop to avoid the two conditional assignments. I let you trying to do it yourself.