0

How to print double

What do you need to put after the % to print double In c language

23rd Apr 2019, 7:13 AM
eilon toledano
8 Answers
+ 10
If the language is C, then you can put %f. Edit: There's more explanation here. https://stackoverflow.com/questions/19952200/scanf-printf-double-variable-c
23rd Apr 2019, 7:22 AM
silentlearner
silentlearner - avatar
+ 10
eilon toledano According to the explanation from the link, printf converts float to double. So yes, %f is for both float and double.
23rd Apr 2019, 8:34 AM
silentlearner
silentlearner - avatar
+ 2
Ya it's %f
23rd Apr 2019, 7:23 AM
Prerak Gada
Prerak Gada - avatar
+ 1
C
23rd Apr 2019, 7:20 AM
eilon toledano
+ 1
So f is both to float and double?
23rd Apr 2019, 8:15 AM
eilon toledano
0
Please specify a language. Because i dont know if this is the same for all languages.
23rd Apr 2019, 7:15 AM
Dragonxiv
Dragonxiv - avatar
0
Which language?
23rd Apr 2019, 7:16 AM
Prerak Gada
Prerak Gada - avatar
0
Double is called a flaot with a wider size
23rd Apr 2019, 8:32 AM
Prerak Gada
Prerak Gada - avatar