User input
// Create an integer variable to store the number we got from the user
int myNum;
// Ask the user to enter a number
printf("Please enter a number: \n");
// Get and save the number entered by the user
scanf("%d", &myNum);
// Output the number entered by the user
printf("The number you entered: %d", myNum);
Comments