I am currently faced with a problem with how to avoid receiving a negative number for subtraction.
My objective is to randomly generate a mathematical equation and save the answer to ,then check if the user is entering the correct answer.
My attempts:
------------
1) I tried to have two temp variables to store two random numbers ,then allocate the larger number to 'x' and smaller on to 'y'.
2) I also tried to have one temp variable to hold the value of 'x' (if larger than 'y') then switch the x and y variables, with temp holding the 'x' variable.
*Error encountered (in both attempts) *
---------------------------------------
this says take an number from 0-3 and add 1, its now 1-4.
symb is [4].
arrays are zero indexed. so symb supports [0], [1], [2], and [3]. 4 is out of bounds and zero is unreachable, the +1 is not correct.