Guest User

Untitled

a guest
Feb 2nd, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void main90
  5. {
  6. int array1[2][5] = {{1, 2, 3, 4, 5}, {10, 9, 8, 7, 6}};
  7. int array2[2][5] = {0} ;
  8. int c,x=5;
  9.  
  10. for(c=0;c<10;c++)
  11. cout<<array1[c]<<endl;
  12. cout<<endl;
  13. for(c=0;c<6;c++)
  14. {
  15. if(c==5)
  16. {
  17. for (x=0;x<5;x++)
  18. {
  19. array2[c]=array1[x];
  20. cout<<array2[c]<<endl;
  21. }
  22. }
  23. else
  24. {
  25. array2[c]=array1[x];
  26. cout<<array2[c]<<endl;
  27. x++;
  28. }
  29.  
  30.  
  31. }
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment