Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement