SWAPPING ARRRAYS

ARRAY1
1 2 3 4 5
10 9 8 7 6

ARRAY2
0 0
0 0
0 0
0 0
0 0
--------
Transferring to
10 1
9 2
8 3
7 4
6 5

1
2
3
4
5
6
7
8



#include <iostream>
using namespace std;
void main()
{
int size_x = 2;
int size_y = 10;
int Array2d[2][10];

for (int i = 0; i < size_x; i++)
for (int j = 0; j < size_y; j++)
{
cout<<Array2d[i][j];
i=j+1;
cout<<endl;
}
}


I dont know how to set the sizes of arrays to 2x10
Can someone show me the near program to this?
You already have an array of 2x10. What are you trying to do with this part though: i = j + 1? Also your array is uninitialized so you will probably be outputting useless information.
Topic archived. No new replies allowed.