I have been looking for a couple of days online and I am stuck on getting my 20 pairs of 3 randomly generated numbers stored in array. I need to sum them eventually and then sort them to show the top 2 scores along with the bottom two scores. The entire code is posted, but specifically lines 29-35. Thanks in advance.
We haven't discussed classes yet. I would like to use a for loop to take the 60 generated numbers and then put them into an array. Here is the code I have but the output is nothing close to what I want...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//function for random numbers(scores)
int scores(int seed, int count) {
int firstRound[60];
cout << "Pair: " << seed;
for(int index = 1; count >= index; index++){
cout << " \t" << ((1 + rand() % 10));
cout << endl;
}
//array to store the 3 scores
for (int i = 0; i <= 60; i++){
for (i = 0; i <= 60; i++ )
cout << firstRound[i] << endl;
return 0;
}
return count;