cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
SWAPPING ARRRAYS
SWAPPING ARRRAYS
Feb 2, 2014 at 7:56am UTC
raveset
(5)
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?
Feb 2, 2014 at 8:12am UTC
giblit
(3750)
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.