c program print integer
This c program first inputs an integer and then prints it. Input is done using scanf function and number is printed on screen using printf.
C programming code
This c program first inputs an integer and then prints it. Input is done using scanf function and number is printed on screen using printf.
C programming code
#include <stdio.h>
int main()
{
int num;
printf("Enter a integer: ");
scanf("%d",&num); /* Storing a integer entered by user in variable num */
printf("You entered: %d",num);
return 0;
}
Output of program:
Enter a integer: 25 You entered: 25