Current location - Training Enrollment Network - Mathematics courses - What is the difference between an input statement and an assignment statement? High school mathematics
What is the difference between an input statement and an assignment statement? High school mathematics
Both the input statement and the assignment statement let the variable get the value.

An assignment statement is a method of assigning the result of an expression to a variable so that the variable can get a value.

Variable = expression;

The Input statement means that the variable gets the number from the input stream, so that the variable can get the value.

Input stream, which can come from keyboard, file or string.

Usually, the input statement needs to be realized by calling the corresponding input function in the system.

Such as getchar (), gets (), scanf (), fscanf (), sscanf () and so on.