C Program to Print an Integer (Entered by the User)

                 C Program to Print an Integer (Entered by the User)





Code:

#include <stdio.h>
int main()
{
    int number;

    // 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("Show your number : %d", number);
    return 0;
}


Output

Enter an integer: 25

Show your number: 25

Post a Comment

0 Comments