-1
#include <stdio.h>
int main()
{
int numeros[10];
printf("Digite 10 numeros (separados por ENTER ou SPACE):\n");
for(int i = 0; i < 10; i++)
scanf(" %d", &numeros[i]);
printf("\nNa ordem inversa:\n");
for(int i = 9; i >= 0; i--)
printf("%d ", numeros[i]);
printf("\n");
rewind(stdin);
getchar();
return 0;
}
In this case above the user just type the elements 1 to 10, but is there any way to make the user choose the amount of elements? For example, first the user says he wants 12, 15, or 20 elements in the array and then he numbers what these elements are.