ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

2020 (Rope, Contest A) Question.
Posted by Petko Minkov 9 Oct 2000 14:35
When you have an answer like :

  2.149999

what do you print?

  2.15 or
  2.14 ?

i mean do you round or cut ?

and by the way, what can i use in C++ for printing
only 2 digits after the point. cout.precision i not
working for 14.10 for example.
Re: 2020 (Rope, Contest A) Question.
Posted by longman cheng(@Killer team of ZJU) 9 Oct 2000 14:50
I use c,and need not worry about rount or cut,just use
'printf("%.2lf",result);' is enough.
Re: 2020 (Rope, Contest A) Question.
Posted by Petko Minkov 9 Oct 2000 22:53
> I use c,and need not worry about rount or cut,just use
> 'printf("%.2lf",result);' is enough.
>

This one really works in C but here, it gets
'Compilation error' with C++! However , on my BC++ 3.1
compiler
it works..