Four arithmetic operations 2 design ideas, four arithmetic design ideas
Four RMB 2-Design Philosophy
Requirement 1: avoid repeated questions
(1) control by srand (time (NULL.
Requirement 2: Customizable (quantity/printing Mode)
(1) define a parameter and use the quantity entered by the user to control the quantity;
(2) the output format can currently be set in two ways: vertical X channels and X * Y output, where X and Y can be selected by the user.
Requirement 3: Control Parameters
(1) All parameter control needs to be selected by the user. The control is implemented in the main function, and the print function is designed separately.
(2) You can set several output functions for the value range.
(3) Whether there is multiplication or division, which can be controlled in the output function and selected by the user
(4) add or remove negative numbers. You can use the parameter to compare the size.
Overall Design: The program involves a lot of loops, one layer of design.