hey i want output in c like below 1 2 3 8 9 4 7 6 5 for the input 3 same way for input 4 output is 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7
Sorry, we don't do homework here. You'll have to go somewhere else. If you want some help writing the code, that's different. What have you written so far and where are you stuck? Can you think of a way to determine what number to display next? Do you think you might need to store the numbers in some kind of data structure before displaying them, or can you calculate the next number without storage?