Define an int variable.
Read an int value from the keyboard into the variable.
Print the variables value.
//C program
#include<stdio.h>
int main(){
//Defining an int variable(number).
int number;
printf("Enter number : ");
//Reading an int value from the keyboard into the
variable number.
scanf("%d",&number);
//Printing the variable number value
printf("You entered : %d\n",number);
return 0;
}
//sample output
Get Answers For Free
Most questions answered within 1 hours.