Experiments and experience summary

1. During formatted input / output, to be noted that the data type definitions, will use the appropriate output format type, int to use% d, float on the use of% f,% lf necessary to use the double otherwise due to lack of precision results in the output data does not correspond to the entered value; scanf function is to be noted in the data to keep the output from the address character, or an error occurs; printf function modifiers in the format of the control on the subsequent character width represents output terms, so that the number of characters and the number of the output format to be the same and in accordance with the order item correspondence.

2. For the if statement and the switch statement, mastered their format ok, if you use these two statements write a program, then first in the brain function and the main structure you need to think clearly can choose to draw down when necessary , followed step by step knitting structure diagram go on just fine, after all, a novice, not started thinking may be more, but not so good proficiency, but as long as you spend a little time and practice your play, cooked just fine, practice makes perfect Well.

3. Do not make small mistakes slightly, remember; do not want to make a logical error occurs, should pay attention to the series of procedures Ruoguo whether there are branches are likely to perform, do not appear the case of a branch can not be executed; function you use to remember It included; note that each brace brackets corresponding to the correct position; pay attention to Chinese characters and English characters of different

Guess you like

Origin www.cnblogs.com/Hy4934-d/p/11795613.html