How can I populate an array or list with sums that don’t go higher than 10?
I could do this with 3 arrays where 2 of them hold random numbers which the answer is not higher than 10, and a 3rd array to have the answers in it.
But that’s kind of an ugly way of doing this.
To be more clear with what I want:
1 + 1 = 2
5 + 5 = 10
3 + 2 = 5
etc etc
The user only gets to see the 1 + 1 at first. And when the time is up, the user gets to see the answer.
So does anyone has another solution then what I’m about to tryout?
Most likely you are trying to do something like this. This compiled but is untested. Noted how to create these pairs using the random number generator and subtraction.
EDIT: FIXED so it doesn’t add to 10 every time LOL. I passed math i promise