daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest May 16th, 2018 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int n;
  8.     while (cin >> n) {
  9.         vector <int> v (n);
  10.         for (int i = 1; i <= n; ++i) {
  11.             cin >> v[i];
  12.         }
  13.         for (int i = 0; i < n; ++i) {
  14.             cout << v[n-i] << " ";
  15.         }
  16.         cout << endl;
  17.     }
  18. }
  19.  
  20. //g++ P67268.cpp -o P67268.exe && P67268.exe
RAW Paste Data
Top