Affichage des articles dont le libellé est Float. Afficher tous les articles
Affichage des articles dont le libellé est Float. Afficher tous les articles

mardi 11 mars 2014

long float topic




On 2014-03-12, Lew Pitcher <(E-Mail Removed)> wrote:
> Does "long float" still mean "double" in ISO Standard C (any vintage)?


It kinda lives on in scanf's conversion specifier:

scanf("%lf", &double_var);





samedi 25 janvier 2014

Formatting float without decimals topic




Hello,

Is it possible to format a float number, but without displaying decimals
if it is an integer ?

For example with "%.2f",
I get "10.50" for 10.5, but I would like "10" for 10 and not "10.00"

Thanks.