Arithmetic Small program test

Source: Internet
Author: User

First, whether the test question is repeated:

In the program, I was divided into 6 modules, I only in the "Simple plus minus" module to avoid duplication of the problem, the other modules are also implemented in a similar way, it is not reflected in the program.

In the Add and subtract module, if the maximum value of the operation is 30, the number of questions is 1000, after running the program found no repetition; if the maximum value of the operation is 10, and the number of questions is 300, the program is no longer down, the reason is 0-10 of these 11 numbers can only out 11*11*2=242 problem, If there are 300, there will be duplicates, and the program has been implemented to avoid duplication, so the program run error.

In other modules, regardless of the maximum value, can output any number of arithmetic problems, but it can be found that when the number of questions are few, the topic is almost no repetition, the number of issues, there will be a lot of repetition!

Second, test the boundary value:

The main test question number, because in the realization avoids duplicates, uses the string array, when the question number is 0 o'clock, will have the array out of bounds error, but when the question number Tens, 100,000, million, the question Time will become, affects the performance!

Arithmetic Small program test

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.