#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;
      C language logo

      Read and print integer

      Codiga's C Recipes

      The integer entered by the user is stored in a variable and printed on the screen


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.