0

Currently I am working on program where input is in the range 10^-6<=x<=10^6,and hence I want to use int64_t, but can't figure out how to take input using it.Please help!!

2 Answers2

7

The portable way is to use <inttypes.h> and do

scanf("%" SCNd64, &your_variable)

One Guy Hacking
  • 1,121
  • 9
  • 15
0

try this

    int64_t x;
    scanf("%lld", &x);
    printf("ans is %lld", x);
roshan_nazareth
  • 321
  • 5
  • 16