Hello,

I had a partial solution for C coded up, however I wasn't sure how to 
format the output correctly.  The problem says the answer for be correct to 
1E-5, but the sample output is "1.4"
When I use %.5f or %f, it does 1.40000.  I can get it to print 1.4 with 
%.2g, however 1.45 outputs as 1.5 when using %.2g.  I tried to code a 
solution that detected how many digits were in the solution, but it failed 
for 120.000000000025 (it output 1.2e+02).

What's the correct way to do this?
BTW, using printf in java using eclipse.

Thanks,
Eric

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-code/-/colHK14rDqUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to