|
|
back to boardHow can I show numbers after dot? Which function I have to use? Posted by Lareon 3 Jan 2009 15:19 Re: How can I show numbers after dot? Which function I have to use? Posted by zadmin 3 Jan 2009 16:06 printf("%0.6f", number) in c/c++ or writeln(number:0:6) in pascal p.s. checkout the other online training/judge website www.z-trening.com, it has more feedback when you submit a problem Re: How can I show numbers after dot? Which function I have to use? Posted by ASK 14 Mar 2014 00:07 Note that scanf uses "%lf" to read double, but printf must use "%f". It looks like printf with "%lf" does not work on Windows, although it works on Linux. |
|
|