fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,i;
  5. scanf("%d",&a);
  6. int data[a];
  7. for(i=0;i<a;i++)
  8. scanf("%d",&data[i]);
  9. for (i=a-1;i>=0;i--)
  10. printf("%d ",data[i]);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5280KB
stdin
8 1 2 3 4 5 6 7 8 9 
stdout
8 7 6 5 4 3 2 1