|
|
вернуться в форумОбщий форум2020 (Rope, Contest A) Question. 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. I use c,and need not worry about rount or cut,just use 'printf("%.2lf",result);' is enough. Re: 2020 (Rope, Contest A) Question. > 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.. |
|
|