You are viewing a single comment's thread. Return to all comments →
This is my solution:
#include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int n = 0; if (scanf("%d", &n) != 1) { return 1; } int arr[n]; for(int arr_i = n-1; arr_i >= 0; arr_i--) { if(scanf("%d", &arr[arr_i]) != 1) { return 1; } } for(int arr_i = 0; arr_i < n; arr_i++) { printf("%d ", arr[arr_i]); } return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays Introduction
You are viewing a single comment's thread. Return to all comments →
This is my solution: