I need your help please..I am given the following data and I need to write C++ commands to get the array filled...
a[source][destination]=some value

how to write C++ code for the following? loop condition can be used

Recommended Answers

Where is your code to get the random number?

Jump to Post

All 4 Replies

Where is your code to get the random number?

I wrote the above array from A routing table..I need the code to write in C++? Loop syntax can be used

Does it matter what you put in the array?

If not, why not just fill it with the same number (e.g. - 1, 5, 19, etc. - whatever you like.)

Or you could fill the array with some permutation of the indices of the array elements themselves. For example,

a[i][j] = i*j; OR
a[i][j] = i + j; OR
a[i][j] = 3*i + 7.9*j; OR
whatever permutation you'd like.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.