Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main()
- {
- ifstream cin("input.txt");
- int n;
- cin>>n;
- string e = "";
- for(int i = 0; i < n; i++)
- {
- string cur;
- cin>>cur;
- if (i%2 == 0)
- cout<<cur<<' ';
- else
- e += cur + ' ';
- }
- cout<<e;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement