0
c progreaming
Write a program to read a positive integer number 'n' and generate the numbers in the following way. If entered number is 3, the output will be as follows: 9 4 1 0 1 2 3
1 Réponse
+ 1
Gaurav Karadbhajane
Where is your attempts?
Try this
for (int i = -n; i <= n; i++) {
if (i >= 0)
printf ("%d ", i);
else
printf ("%d ", i * i);
}