Pattern InvertedHourGlass

https://ide.codingblocks.com/#/s/26918
https://hack.codingblocks.com/contests/c/474/1418

how to print numbers instead of stars.

Your code is wrong even for stars.
For input=5, you have to print 11 rows as per question, but your code prints only 9 rows. Try to rectify it.
To print numbers instead of stars, take a separate variable like val.
Initialize the variable to n, which is input by user, everytime you reach a new row, then decrease its value till the middle of row and then again increase it by 1, till the end of row.