+ 1
What am I doing wrong on “Halloween Candy” activity?
https://code.sololearn.com/cVZoH50bKnI0/?ref=app My code won’t round up correctly!
1 Respuesta
+ 2
You are using type conversion to int - not rounding.
If you int a floating point number, only the decimals are cut off. Basically you round towards zero.
For proper rounding - and ceiling and flooring - include cmath and use the specific functions from there.