On Wednesday, 24 July 2019 at 15:57:06 UTC, a11e99z wrote:
On Wednesday, 24 July 2019 at 15:56:13 UTC, a11e99z wrote:
On Wednesday, 24 July 2019 at 15:45:08 UTC, Greatsam4sure wrote:
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

  readf!" %s\n"( num );
or
  num.readf!" %s\n";
or
  num = readln.strip.to!double;

      writeln(num)

The result is always to six significant figure. I want the whole number to be diaplay

oops! i misunderstood


Reply via email to