SHARE
TWEET

Untitled

a guest Jan 28th, 2020 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int arr[100], n;
  8.     cin >> n;
  9.     for (i = 0; i < n; i++) {
  10.         cin >> arr[i] >> " ";
  11.         if (i % 2 == 0) {
  12.             cout << arr[i] << " ";
  13.         }
  14.     }
  15.  
  16.  
  17.     return 0;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top