Write a Program take integer from user and display integer

Source code

#include <stdio.h>
#include <conio.h>
main()
{
    int num;
    printf("Enter a integer: ");  
    scanf("%d",&num);  /* Storing a integer entered by user in                                 variable num */
    printf("You entered: %d",num);
    getch();
}

Output

Enter a integer: 25
You entered: 25


No comments:

Post a Comment