You must use “scanf” statement to read the input. You must also include the necessary header file to use all the built-in functions in any programming languages.
scanf(“%d”, &number);
Since “scanf” is a statement it must end with the semicolon. “scanf” accepts two parameters, first the type of value and second is the address of the variable to store the given input.
Here “&” represents the address of the given variable. “%d” is used for integer, “%f” is used for float, “%s” is used to receive string inputs, etc.