Computer language is a computer can recognize and accept the language, to make the computer to run or work according to their own intentions, must use the computer can accept, understand and execute instructions to command the computer work.
Most of the low-level language can achieve the function of C language can be achieved, the first contact with C language think it will be used as VB, but slowly found that C language operators and data structure richer, grammar restrictions are not too strict, but it is this also makes the program design free space to expand, And the C language generated program execution efficiency is high.
C language Program consists of function description and function body two parts, function description part includes: Function name, function type, formal parameter name, formal parameter type. function body is the implementation of the function of the specific operation, composed of statements. The running of the program is always run from main function main (), and the written format of the statement is relatively free, and the statement ends with a semicolon.
Title: If the input content is an integer between 0 and 200, output correctly input and the input number as the age of the output, the rest of the input data output error
Analysis: According to the topic, only if the input is an integer, and the integer must be between 0 and 200, then when used in addition to typing data between 0 and 200 on the keyboard, it will be possible to enter the number, character, string, or number plus character or string. In combination with the various cases of input, the individual believes that the use of the character array to receive user input data is more appropriate, so that the input data to ensure the complete acceptance, if you predecessors have better views, le smell its detailed ha ... And the output is nothing more than two correct and wrong, so you can consider using If...else ... Condition to determine the result of the output
The code is as follows:
View Code
Personal Summary:
The topic has several layers of conditions to judge, it is better to distinguish one by one, as if the English attributive (attributive to the center of the word to play the role of the modifier) to clarify what kind of data, the subject is an integer type of data, and then to determine which scope of the integer data, and secondly to pay attention to the use of the program efficiency The first time I write this job can only let it run one time, of course, I also want to write a recursive call with a loop for statement to achieve the use of multiple runs, but for the condition does not exactly express, so this topic while with loop is a good choice. The first time to write a blog, but also hope that you more advice
C-Language and user-interface-tolerant processing