-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayIntro
More file actions
28 lines (27 loc) · 759 Bytes
/
ArrayIntro
File metadata and controls
28 lines (27 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// dfsafsafhasfkh safs js sfsfsafirst line of the input contains ,where is the number of integers.The next line contains integers separated by a space.
//Constraints
//where is the integer in the array.
//Output Format
//Print the integers of the array in the reverse order in a single line separated by a space.
//CODE
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
#define MAX 10000
int main() {
int arr[MAX],size,i;
scanf("%d",&size);
for(i=0;i<size;i++)
{
scanf("%d",&arr[i]);
}
for(i=size-1;i>=0;i--)
{
printf("%d ",arr[i]);
}
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
return 0;
}