- #1
needOfHelpCMath
- 72
- 0
I want to generate 500 numbers in an array but in order? For example I can generate 500 random numbers with this code but how will i be able to put it in order?
HTML:
//code example
cout << "Generate 500 random numbers:" << endl;
const int nnn = 500;
int numberOfArray3[nnn];
for (i = 0; i < nnn; ++i) {
numberOfArray3[i] = rand() % 100;
cout << numberOfArray3[i] << " ";
}