Apr 24, 2015 at 9:26am
Move line 36 directly after line 41 (without the type int
)
After line 37: int numbers[numbersSize];
Last edited on Apr 24, 2015 at 9:28am
Apr 24, 2015 at 9:26am
morning.
You can't do this:
int numbers[i] = rand() % 100 + 1;
even if you were to define i.
You need to populate your numbers array in exactly the same way as you are printing out it's contents, e.g.
1 2 3
|
for (i = 0; i < numbersSize; ++i) {
numbers[i] = < create a random number here and assign to the ith element in the array >
}
|
edit:
and declare your array like this:
1 2
|
const int numbersSize = 8;
int numbers[numbersSize];
|
Last edited on Apr 24, 2015 at 9:29am