Question: Math 1.4 No Decimal places? Rounds down?


#1



I notice that 90/100 is 0, even 99/100 is 0. Except for 90.5/2 is 45.25
How does this work?


Replace this line with your code.


#2

I guess when you do a division with only whole numbers, it rounds it up to whole numbers as well and does the reverse when any of it is a decimal.


#3

Integer division preserves data type, the result is floored (not rounded and not upwards)


#4

Hmm alright, thanks for your explanations. I thought there was one more thing that was missing or something, but I guess the data is preserved. Whole numbers and whole numbers. Decimals and Decimals. Rounds down is the new rule I suppose.