fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void justPrintIt(double number) {
  11. System.out.printf("%020." + ((int) number) % 10 + "f\n", number);
  12. }
  13. public static void main(String args[]) throws Exception {
  14. justPrintIt(3.56);
  15. justPrintIt(56.7);
  16. justPrintIt(1002.5);
  17. justPrintIt(110.4);
  18. }
  19. }
Success #stdin #stdout 0.08s 380160KB
stdin
Standard input is empty
stdout
0000000000000003.560
0000000000056.700000
00000000000001002.50
00000000000000000110