+ 9
How the output comes 50?
A = 96 B = 50 B%A = ?
64 Respostas
+ 13
Learner🎯
50÷96 not 96÷50
So the remainder would be 50
+ 7
Because when you divide 50/95 the remainder left is 50 and that what is returned by the modulo("%") operator.
+ 6
You only see this
96 | 50 | 0
- 0
--------------------
50
--------------------
the remainder would be fifty only na?
Because the number 50 is'nt divisible by 96
+ 6
Learner🎯 When there is A % B then reminder will be 46 but there is B % A that's why reminder is 50.
A % B = 96 % 50 //reminder 46
B % A = 50 % 96 //reminder 50
+ 6
If in B % A B < A, then it will return B🙂
+ 4
Learner🎯 you are not doing 96/50 instead you are performing 50/96. Just have a look at it.
+ 4
See, you are dividing 50 by 96 not
96 by 50. The rest process is already being answered. If you'll divide 96 by 50 then, then the quotient will be 1 and remainder Will be 46.
Always remember that sequence really matters.
Let's say you have to subtract
30 from 50.
Then the result will be 20.
But if I say, subtract 50 from 30
Then, the result will be -20.
And there is much difference between 20 and -20
Same case here also.
+ 3
Sorry ! I am confused
+ 3
Learner🎯
Easy trick:
1st number less than 2nd number answer is 1st number.
2%7=2
5%10=5
+ 3
Thanks all ! I was little bit confused. Now everything is clear.
+ 3
Learner🎯
Swim is correct.
Your doubt confused me too😅
I read my answer again and realised that it's wrong so, I have corrected it. You can check
+ 3
Learner🎯
You should not ask more than one question of two different types in the same thread. Better to create a new thread
+ 3
A%B=46
50)96(1
50
__
46
__
B%A=50
96)50(0
00
__
50
__
+ 3
Because:
(50/96) = ((0*96)+50)
So, the remainder is 50(the output of code)
+ 2
Learner🎯 quotient is 0 and remainder is 50
+ 2
Yup,now you are correct
96//50 would be what?
The quotient would be 1 only
And remainder is 46 then.
You have used there 50//96.
So, the remainder Will be 50
And quotient is 0.
Whenever, you'll get confused with this. Try putting values in the variables where they are used like:
It's B%A so, put the values there
50%96.
+ 2
~ swim ~ thank u bhaiya
+ 2
Learner🎯 your question going to become a 'Hot today' question.☺☺☺☺
+ 2
= 0
----
96 )50
0
------
50
Here the remainder is 50.
+ 2
Zeeshan Khan you should post your question in new thread brother every query should be related to a particular topic otherwise it will be mess up.