24 procedures (1)

xiaoxiao2021-03-06  46

Yesterday, I discussed a 24-point program, I personally feel better, and the time complexity is not high, and because I have used it to the stack, it is not too familiar with it, and it is not too familiar with the stack, and it is not too familiar with the stack. Basic function is 1) Randomly generate 4 random integers 2) Let the player choose to select - * / 4 symbols, make the result 24, correctly prompt, error prompt result error 3) Set a button, All correct results are listed later (here is the key to the algorithm, involving various usages of the stack, and the algorithm for transition to suffix expressions) specific implementation

One: The above algorithm is based on the MFC in VC . It is possible that the result of the column is that there is no information in the hand, it is the definition of the stack class to be defined. Therefore, the time may have the next few more than the following more difficult to implement 1) Use the stack to convert the infix expression into a suffix Expression 2) Then or use the stack method to convert the suffix of the converted suffix to the expression of the specific details, etc. Today, after moving, it is realized.

转载请注明原文地址:https://www.9cbs.com/read-52678.html

New Post(0)