Advertisement
Guest User

Untitled

a guest
May 26th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include<iostream>
  2. #include<stdlib.h>
  3. #include<time.h>
  4. using namespace std;
  5. int main()
  6. {
  7. int x;
  8. cout<<"Enter size of array: ";
  9. cin>>x;
  10. int tab[x];
  11.  
  12. for(int i=0;i<x;i++)
  13. {
  14.  
  15. cin>>tab[i];
  16. }
  17.  
  18. for(int v=0;v<x;v++)
  19. {
  20.  
  21. if(v%4==0)
  22. {
  23.  
  24. cout<<tab[v]<<" ";
  25. }
  26.  
  27. else
  28.  
  29. cout<<endl;
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement