Arithmetic 2 design ideas

Source: Internet
Author: User

Four Yuan 2--design thought
Requirement 1: Avoid duplication of questions
(1) Control by Srand (Time (NULL));
Requirement 2: Can be customized (quantity/printing method)
(1) Define a parameter, use the number of user input to control the quantity;
(2) The output format can now be set two ways, one way is the longitudinal x-ray, the other is the x*y format output, where x, Y can be controlled by the user choice.
Requirement 3: Control parameters
(1) All parameter control should be selected by the user, the control is implemented in the main function, the printing function is designed separately
(2) The value range can be set several output functions, the user chooses
(3) Whether there is a multiplication method, can be controlled in the output function, the user to choose
(4) The addition or subtraction of negative numbers can be achieved by the parameter comparison size
Overall design: The program involves a lot of loops, a layer of design.

Arithmetic 2 design ideas

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.