C Programming Examples Tutorial Index

C Number Programs

This C program is used to print given integer input by the user on the screen.



scanf function is used to obtain input and printf function is used to print the number on the screen.

Example:

#include<stdio.h>

int main()
{
    int number;
    
    printf("Please enter an integer: \n");
    scanf("%d", &number);
    
    printf("You enter the integer %d\n", number);
    
    return 0;
}

Program Output:

print-integer



Found This Page Useful? Share It!
Get the Latest Tutorials and Updates
Join us on Telegram