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

	Enter an integer
	12
	Integer entered by you is 12
Compile and Run Online