I am writing a lottery machine for a class.
I am having trouble figuring out how to return the new value I receive.
If I get an even number I subtract that from the bank.
if I get an odd number I add that to the bank.
The base bank number is 25.
For instance if I get my first random number of 5. I add that to 25 and get 30.
Then if I want another try and get a random number of 2. I subtract that from 30 to get 28.
And so on until I stop the program with character n, or the bank reaches 10 or less.
I have been trying to figure this out on my own, but have not gotten anywhere.