Friday, 10 November 2017

C program to take input from user using scanf


#include

main()
{
   int number;

   printf("Enter an integer\n");
   scanf("%d",&number);

   printf("Integer entered by you is %d\n", number);

   return 0;
}

Output:

Enter a number
5
Number entered by you is 5


More C Programs:

C hello world program
C Program using if else control instructions
C program looping
C program for prime number
C program for command line arguments
Simple C array program
Simple C function program
C program using structures
C program for Fibonacci series
C graphics programming

100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...