decimalformat Questions

2

Solved

Float sum = new Float(300); // always somehow calculated DecimalFormat df = new DecimalFormat("#.#"); String s = df.format(sum/3); // prints 100, I want 100.0 s = df.format(301/3); // pritns 100.3 ...
Illampu asked 30/8, 2010 at 15:4

2

Solved

How would I convert the following code to C# DecimalFormat form String pattern = ""; for (int i = 0; i < nPlaces - nDec - 2; i++) { pattern += "#"; } pattern += "0."; for (int i = nPlaces - n...
Pons asked 16/10, 2009 at 8:21

3

Solved

I have an XML file where the number are comma-separated <foo> <bar val="1,23"/> <bar val="4,56"/> <bar val="7,89"/> </foo> I would like to make a sum over /foo/b...
Asco asked 15/3, 2009 at 15:35

© 2022 - 2024 — McMap. All rights reserved.