According to the last program implementation process and the final programming results, it can be found that there are many fixed values can be entered from the keyboard, so as to meet the various requirements of different users, including the number of topics, the range of values, as well as the type of numerical values, I briefly describe my view of the design requirements.
A Avoid duplication of topics
The so-called repetition, is in the program automatically generated exercises, there are two or more questions of the first digit, the second digit and the symbol are respectively equal, so you can add a loop branch program and a conditional branch program to implement filtering.
Two Customizable quantity
The number of fixed topics in the last experiment is $, so it can be entered as a user keyboard .
Three Whether there are negative numbers
If only two numbers participate in the operation, you can compare the size of the two numbers directly, if there are more than one number of participating in the operation can be calculated by whether the result is negative and then filtered.
Four Whether there is a multiplication method
Each operation symbol in the program has a specific condition, and by adding a conditional branch you can choose whether to have a multiplication operation.
Five Whether there are decimals
Similar to adding the multiplication method, adding a conditional branch is easier to reduce for an integer, but for fractional accuracy there is no way to achieve it.
On the idea of arithmetic further optimization