Return the complete number
drug
drug2004 at bk.ru
Wed Jul 24 15:55:11 UTC 2019
24.07.2019 18:45, Greatsam4sure пишет:
> int main(){
> double mum = 0;
> Write("enter a number: ")
> readf(" %s\n",&num);
> Writeln(num);
>
> }
>
> How do I return the complete number the user enter since I don't since
> the user can enter numbers of various length with dmd approximating it.
>
> I will appreciate any help
does it help?
writefln("%.8f", num); // for float
writefln("%.16f", num); // for double
More information about the Digitalmars-d-learn
mailing list