I. Avoid duplication of topics
Save the two operands and operation symbols of the topic to three arrays, and then compare the operands and the operation symbols in the array after each question. If all three are the same, re-set the question, and if not the same, store the data in an array and continue the quiz.
Second, can be customized
Set two variables to control the number and printing method, entered by the user.
Third, whether there is multiplication law
Subtraction can take 4 of the remainder to control, does not support the multiplication method can take 2 of the remainder to control.
Iv. Range of values
The range of values is determined by controlling the generation range of random numbers.
Five, plus and minus there are no negative
By randomly generating a number n, using (-1) The N-square to control whether it is negative, negative print to add parentheses such as: 1+ (-3) = or 3-(-1) =.
Six, Division has no number
After the random number is generated, the validation can be divisible and printed again, or the random number is regenerated.
Seven, whether to support the score
Generates 4 random numbers representing two molecules and two denominators, respectively.
Arithmetic 2 design ideas