0
floor division
why the result of -11//5 is -4 not -3
6 Antworten
+ 4
It is definitely -3🙄
+ 2
Petr I don't think // exists in c
+ 1
Abhay sorry, I wanted to write -11//3 is -4 not -3
0
Asma Al-Samman In real mathematic the whole is the smallest of division. And the % is always the positive number. But in c and pascal it is wrong. It was the logics mistake from IBM. and in python -11//5 is -3, in c is -2
0
Abhay i try to describe the basis of problem and you are right. I corrected / .
0
Abhay yes, you're right again. but if we explain the semantics of another language when responding to the user regarding logic, then he may get confused in his thoughts :)) in c we will get the whole of division by another chars :)