C Program to Print an Integer Entered by the User

Code of the Program

#include <stdio.h>
int main() {   
    int number;
   
    printf("Enter an integer: ");  
    
    // reads and stores input
    scanf("%d", &number);
    // displays output
    printf("You entered: %d", number);
    
    return 0;
}

Output

Insert Integer: 20
You are Inserted : 20

Related Posts