Hi I am making an application that randomly generates numbers. I then have to find out if those numbers are even or odd. Then place them in the corresponding array ( EvenNumbers() or OddNumbers() ). Then display the random numbers array then the even and odd numbers array.
I am up to the point where I have the generated numbers and can tell if they are even or odd, but can't get them into an array.
I am trying to do it like this....
But I am getting an error that says I am using the EvenNumbers() and OddNumbers() variables before they have a value. But I what does that mean since I am obviously setting them equal to something?Code:
If intNumArray(i) mod 2 = 0 then
intTemp = intNumArray(i)
EvenNumbers(i) = intTemp
else
intTemp = intNumArray(i)
OddNumbers(i) = intTemp

