Important C Programs

C Program to Print an Integer Entered by the User

//C Program to Print an Integer Entered by the User
//Header Files
#include<stdio.h>
#include<conio.h>

//main function
//where the execution of program begins
void main()
{

int number;
clrscr();

// printf() dislpays the formatted output
printf("Enter an integer: ");

// scanf() reads the formatted input and stores them
scanf("%d", &number);

// printf() displays the formatted output
printf("You entered: %d", number);
getch();

}

//Now run the program by ctrl+f9

Output


You can also see a video how to run this program