A small program with no bugs found

Source: Internet
Author: User

A small program with no bugs found

I saw such a small program in the past two days. After searching for half a day, I did not find a bug. It was very depressing. I sent it to the Internet to see if anyone could find some bugs, even small bugs. The program is introduced as follows: 1. The program name is 'maths '. The system gives a random calculation, enters the correct number in the blank space, and automatically adds a point to the correct score. If the score is incorrect, a point is subtracted. If the score is already 0, the score deduction is invalid. 2. After completing one operation, the system will randomly give the next calculation until the end of the time (Min is minute, SEC is second, total 2 minutes, Min and SEC decrease with time ). 3. At the end of the time, the system displays figure 2. The current score is displayed at score, and the Hi-score is the highest score. 4. Only 0 ~ 9. 5. the maximum value of the formula is three. _ (+-*/) _ = _. the number to be entered may be in any number area. 1. the basic computing test is completed after a long time. The calculation is correct and the score is correct. 2. the basic score and the highest score are correct. verify the correctness of the random calculation formula. For example, if you want to enter a number greater than 2 digits, decimal number or negative number. 4. test the highest score, want to see more than 99 what kind of, helpless 2 minutes time, the highest score exceeds 60, average 2 seconds a question, it is difficult to break through 5. test the Score Deduction and check whether the program has a negative score. The result is always zero, and no bug6. test 0 is calculated in each segment, especially when it is the denominator, for example, 6/_ + 3 = 5, _/4 + 2 = 27. test the computation of 99 in each segment to verify the overflow and decimals. For example, 48/_ + 3 = 5, _/4 + 2 = 28. test the calculation of the combination of 0 and another number, such as, but the system controls the input of 0. When other numbers are input, the latter number overwrites 0, and the first digit is never displayed as 0. Special Case 1. When the game is in progress, the game is powered off or shut down. Open the game and check whether the score is saved. Although I always believe that" Only programs with no bugs found and no programs with no bugs found". But does anyone have other ideas to test. Figure 1 Figure 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.