C program to print integer || C program to scan integer

This c program first inputs an integer and then prints it. Input is done using scanf function and number is printed on screen using printf.

#include <stdio.h>
 
int main()
{
  int a;
 
  printf("Enter an integer\n");
  scanf("%d", &a);
 
  printf("Integer that you have entered is %d\n", a);
 
  return 0;
}
Share this Post Share to Facebook Share to Twitter Email This Pin This Share on Google Plus Share on Tumblr join on whatsapp

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment