|
|
back to boardCommon BoardJava. How to output real numbers with some digits after decimal point(-) Re: Java. How to output real numbers with some digits after decimal point(-) PrintWriter out = new PrintWriter(System.out); out.printf(Locale.US, "%.9f", 2.0/5.0); this code prints real value with 9 digits after decimal point. but it is a slow method if you want to output more than 10000 real numbers. Re: Java. How to output real numbers with some digits after decimal point(-) Thank you! |
|
|