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