Guest User

Untitled

a guest
Nov 13th, 2019
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. int x, i;
  6. cin >> x;
  7. int tabl[x];
  8. for(i=1; i<=x; i++)
  9. {
  10. cin >> tabl[i];
  11. }
  12.  
  13. for(i=1; i<=x; i=i+2){
  14. cout << " " << tabl[i];
  15. }
  16.  
  17. cout << endl;
  18.  
  19. for(i=2; i<=x; i=i+2){
  20. cout << " " << tabl[i];
  21. }
  22.  
  23. return 0;
  24. }
RAW Paste Data