scanf is used to allow a program to get data from the keyboard.
int input;
printf("Please enter an integer");
scanf("%d%*c", &input);
These instructions will display a prompt to the operator and then stop the program until the operator keys in an integer and presses <Enter>. The integer entered will be stored in the variable named "input".