Advertisement
Md_hosen_zisad

Reverse array

Sep 24th, 2017
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int arr[6];
  5.     int i,j,n;
  6.     scanf("%d",&n);
  7.     for(i=1;i<=n;i++)
  8.     {
  9.         scanf("%d",&arr[i]);
  10.  
  11.     }
  12.     for(i=n;i>0;i--)
  13.     {
  14.         printf("%d",arr[i]);
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement