- #1
FrostScYthe
- 80
- 0
Hey.. I'm having trouble achieving this in C++...
I'm trying to do an opperation but keeping only 2 decimals, and floor rounding.
((3.52 * 4.32)/3.26) + 2.34
So I have 3.52 * 4.32 = 15.2064, but then I just round to 15.20
then 15.20/3.26 = 4.662576687116, but then I just round to 4.66
... and so on...
anyone know how to achive this in C++, I've thought of the floor command but how do I see the precision to only 2 decimals?
I'm trying to do an opperation but keeping only 2 decimals, and floor rounding.
((3.52 * 4.32)/3.26) + 2.34
So I have 3.52 * 4.32 = 15.2064, but then I just round to 15.20
then 15.20/3.26 = 4.662576687116, but then I just round to 4.66
... and so on...
anyone know how to achive this in C++, I've thought of the floor command but how do I see the precision to only 2 decimals?