Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void main90
- {
- int array1[2][5] = {{1, 2, 3, 4, 5}, {10, 9, 8, 7, 6}};
- int array2[2][5] = {0} ;
- int c,x=5;
- for(c=0;c<10;c++)
- cout<<array1[c]<<endl;
- cout<<endl;
- for(c=0;c<6;c++)
- {
- if(c==5)
- {
- for (x=0;x<5;x++)
- {
- array2[c]=array1[x];
- cout<<array2[c]<<endl;
- }
- }
- else
- {
- array2[c]=array1[x];
- cout<<array2[c]<<endl;
- x++;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment