Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<vector>
- using namespace std;
- int main(){
- int N;
- string manas,temp;
- while(N!=0){
- cin >> N;
- if(N!=0){
- string arr[N];
- for(int i = 0; i<N; i++){
- if(i%2 == 0){
- cin >> manas;
- arr[i] = manas;
- }
- else{
- cin >> manas;
- arr[N-i] = manas;
- }
- }
- for(int i = 0; i<N; i++){
- cout << arr[i] << endl;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment