Int Operations with Decimal Results? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

Int Operations with Decimal Results?

Do int operations with decimal results floor or ceiling the result? Like how the example problem gives 15/4, does it always floor, always ceiling, or depend on being above or below half?

17th Aug 2021, 9:03 PM
Arron
Arron - avatar
2 Respuestas
+ 1
It doesn't floor or ceil itself.
17th Aug 2021, 9:16 PM
Abhay
Abhay - avatar
0
It just performs (euclidean) division How many times does 4 go into 15?
18th Aug 2021, 5:56 AM
Angelo
Angelo - avatar