0
printg matrix with astrich
Accept an integer N as the input. The program must print the pattern as shown in the Example Input/Output section below. (Note:Integer N is always odd). Asterisk is printed along the border and in the center of the Example Input/Output 1: Input: 5 Ouput: * * * * * * 1 2 3 * * 4 * 6 * * 7 8 9 * * * * * *N*N matrix which is printed as the output.
3 Answers
+ 1
You should try it yourself before asking such a question. This question sounds like a homework . Is this some assignment you were given? If yes, you should do it on your own.
Anyway, something like this should work:
https://code.sololearn.com/c3CAPVxeJ5g2/?ref=app
+ 1
thank you so much @S.C.
i got the out from the link but i cant understand the full program can you please elaborate
0
Is this an assignment you have been given?