Read long from keyboard : Long « Data Type « C / ANSI-C






Read long from keyboard


#include <stdio.h>

void main()
{
  long feet = 0L;               /* A whole number of feet                    */
 
   printf("Enter long: ");
   scanf("%ld", &feet);
   printf("your input is %ld", feet);
}


           
       








Related examples in the same category

1.long value array
2.Summing integers - compact version
3.Choosing the correct type: longChoosing the correct type: long
4.Use nested if to analyze numbers
5.Convert long to short int