XandreasrektsX

Ez

Oct 5th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include<iostream>
  2. #include<vector>
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. int N;
  8. string manas,temp;
  9. while(N!=0){
  10. cin >> N;
  11. if(N!=0){
  12. string arr[N];
  13. for(int i = 0; i<N; i++){
  14. if(i%2 == 0){
  15. cin >> manas;
  16. arr[i] = manas;
  17. }
  18. else{
  19. cin >> manas;
  20. arr[N-i] = manas;
  21. }
  22. }
  23. for(int i = 0; i<N; i++){
  24. cout << arr[i] << endl;
  25. }
  26.  
  27.  
  28. }
  29.  
  30. }
  31.  
  32.  
  33.  
  34. }
Add Comment
Please, Sign In to add comment