C program to take input from user using scanf - C Program

C program to take input from user using scanf

 #include <stdio.h>
 
int main()
{
   int number;
 
   printf("Enter an integer\n");
   scanf("%d",&number);
 
   printf("Integer entered by you is %d\n", number);
 
   return 0;
}

Output - C program to take input from user using scanf

Enter a number
5
Number entered by you is 5
Compile and Run Online