I want to write a code that gets the integer n from the user and prints numbers in a spiral pattern from 1 to n*n without using arrays. output for entering 5
input3
output:
1 2 3
8 9 4
7 6 5
do you have any suggestions on how to write this code?
Aucun commentaire:
Enregistrer un commentaire