Skip to main content

Read and display a number from the keyboard

#include<stdio.h>
int main()
{
int n;
printf("Enter a number\t:\t");
scanf("%d", &n );
printf("The number you have entered is %d", n);

return 0;
}

Enter a number :  5
The number you have entered is 5

Comments