0
Why is this 5.0 Finished instead of 5 Finished if both variables are integers instead of float?
3 Antworten
+ 2
This is explained in the first lessons : dividing 2 integers gives a float, even if the result can be represented as an integer. This is different that C but you can still perform euclidian division using // instead of /.
+ 1
the division operator / converts the integers automatically into floats.
0
i found this helpful