Skip to content

Commit d372ee8

Browse files
authored
Create Day7-Arrays.c
1 parent 64b5f17 commit d372ee8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* Sample Input
2+
3+
4
4+
1 4 3 2
5+
Sample Output
6+
7+
2 3 4 1
8+
9+
Print the elements of array A in reverse order as a single line of space-separated numbers. */
10+
11+
#include <assert.h>
12+
#include <limits.h>
13+
#include <math.h>
14+
#include <stdbool.h>
15+
#include <stddef.h>
16+
#include <stdint.h>
17+
#include <stdio.h>
18+
#include <stdlib.h>
19+
#include <string.h>
20+
21+
int main()
22+
{
23+
24+
int n; int temp;
25+
scanf("%d",&n);
26+
int a[n];
27+
for(int i=0;i<n;i++)
28+
{
29+
scanf("%d",&a[i]);}
30+
31+
for(int i=n-1; i>=0;i--)
32+
printf("%d ",a[i]);
33+
return 0;
34+
}

0 commit comments

Comments
 (0)