Accept Element form user And Print it .



Accept elements from user


                                   
                                                Accept elements from user and print it .

                In this tutorial we learn how to accept element in C language.
                The  main statement is required scanf("",&);
                The scanf statement is use for take input from user 
                The datatype of data is written in double quote. 

  •       Character value  %c
  •       Integer value      %d
  •       Floating value    %f
                These three are the basic datatype .

Step : 1

                Open your turbo C compiler
          Type the following program .

#include<stdio.h>


void main()
{
  int a;
  printf("Enter one integer value :");
  scanf("%d",&a);
  printf("Entered integer is %d",a);
  getch();
}


Step : 2

        Compile your program for checking your                              program error then 
                 Run it to pressing Ctrl + F9









                                        

Comments

Popular Posts