0

Подскажите, почему деление 11 на -5 дает такой результат

https://code.sololearn.com/clWlBB20rtkk/?ref=app

12th Feb 2020, 11:31 AM
Сергей Сипко
Сергей Сипко - avatar
4 ответов
+ 1
Because // returns int values.And -3 is also int type.if you want float use /.
12th Feb 2020, 12:14 PM
Wasi
Wasi - avatar
+ 1
// - floor division 11 // -5 = floor( -2.2 ) = -3
12th Feb 2020, 12:21 PM
Mihai Apostol
Mihai Apostol - avatar
+ 1
great! thaks!
12th Feb 2020, 1:10 PM
Сергей Сипко
Сергей Сипко - avatar
0
Welcome
12th Feb 2020, 1:19 PM
Wasi
Wasi - avatar