C Program to Print an Integer

24

The printf() function is used to display message and value using format specifiers and scanf() function is used to read the data from the user input and store the data into the variable.

Flow Chart to Print an Integer

C Program to Print an Integer
C Program to Print an Integer
#include <stdio.h>

int main() {
    int no;


    printf("Enter an no: ");

    // scanf() reads the input and stores them into no variable
    scanf("%d", &no);


    printf("entered number = %d", no);
    return 0;
}

Output

Enter an no: 10
entered number = 10

Get real time updates directly on you device, subscribe now.

Subscribe to our newsletter
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
You might also like