+ 1

9% (7//2)=1 i am not understanding when there is reminder is 1 of 7 by 2 then how its coming one with 9 ??

Explain it in detail please i am little weak in maths

3rd Jan 2017, 4:49 AM
Harsh Ranjan
Harsh Ranjan - avatar
4 odpowiedzi
+ 2
//--> floor division therefore, 7//2=3 %-->remainder therefore, 9%3=0 hence , final answer is 0 not 1.
3rd Jan 2017, 8:08 AM
nitesh
0
as clearly explained by nitesh / : operator used to give a division value in floats //:operator used to give a division value in integer %:operator used to give remainder so 7//2 would give 3 and then 9%3 doent gives any remainder as it is divisible and no residue is left hence 0.
3rd Jan 2017, 9:48 AM
ANIMESH GUPTA
ANIMESH GUPTA - avatar
- 1
you can say that also if you whant
3rd Jan 2017, 8:09 AM
Harsh Ranjan
Harsh Ranjan - avatar
- 1
wait let me find out the real question there are some error
3rd Jan 2017, 9:50 AM
Harsh Ranjan
Harsh Ranjan - avatar