+ 1

How to print decimal point number upto 17 digit

Which format specifer should I use in C to print this decimal number 936297014.1164?If it is not possible to print this directly, please tell me how would I able to print this.

26th Aug 2022, 1:01 PM
KAZI FAISAL MAHMUD
KAZI FAISAL MAHMUD - avatar
3 odpowiedzi
+ 2
#include <stdio.h> int main() { double num = 936297014.1164; printf ("%lf", num); return 0; }
26th Aug 2022, 1:06 PM
Aman Kumar Sinha
Aman Kumar Sinha - avatar
+ 1
KAZI FAISAL MAHMUD // Try This... #include <stdio.h> int main() { double num; scanf("%lf", &num); printf ("%lf", num); return 0; }
26th Aug 2022, 1:43 PM
Aman Kumar Sinha
Aman Kumar Sinha - avatar
0
@Aman Kumar Sinha https://code.sololearn.com/cZp127FAS5bp why this code give wrong answer for input 876652098643267843 ?
26th Aug 2022, 1:17 PM
KAZI FAISAL MAHMUD
KAZI FAISAL MAHMUD - avatar