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!!

Sagar Tyagi
  • 19
  • 1
  • 3

2 Answers2

7

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

scanf("%" SCNd64, &your_variable)

One Guy Hacking
  • 1,176
  • 11
  • 16
0

try this

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