/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.DecimalFormat;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
double a = 91.32;
double b = 5.22;
double c = 11.5;
double d = 1.2;
double e = 2.6;
System.
out.
println(getTwoDecimals
(a
)); System.
out.
println(getTwoDecimals
(b
)); System.
out.
println(getTwoDecimals
(c
)); System.
out.
println(getTwoDecimals
(d
)); System.
out.
println(getTwoDecimals
(e
));
}
private static String getTwoDecimals
(double value
){ return df.format(value);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnRleHQuRGVjaW1hbEZvcm1hdDsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CiAgICAgICBkb3VibGUgYSA9IDkxLjMyOwogICAgICAgZG91YmxlIGIgPSA1LjIyOwogICAgICAgZG91YmxlIGMgPSAgMTEuNTsKICAgICAgIGRvdWJsZSBkID0gIDEuMjsKICAgICAgIGRvdWJsZSBlID0gIDIuNjsKICAgICAgIAogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihnZXRUd29EZWNpbWFscyhhKSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKGdldFR3b0RlY2ltYWxzKGIpKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oZ2V0VHdvRGVjaW1hbHMoYykpOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihnZXRUd29EZWNp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