Print Integer

In this program, we first take input as a number with the help of scanf, then print the same number on the default output screen On our monitor as LCD, with the help of printf() function.
in order to use printf() and scanf() into our function we need to include headerfile #include<stdio.h>

C programming code

#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;
}

No comments:

Post a Comment