0
I can't get fully, if this: var a =10, var b = 3 var c = a℅(a -b) and the answer is = 3, but how?
3 Réponses
+ 6
a-b=7
10%7=3
so c is 3
% is reaminder operator.
0
a now will be 10 and b will be 7
If you calculate this a%b it will give you a different result
But you can consider it as, how many b in a, in another language how many 7s in 10 and you will get its one 7 and the reminder of that will be 3.
Ex.
var a = 16
var b = 6
var c = a % (a - b)
Can you guess what is the output of this?!
I'll catch up with you later to give you the explanation ☺
0
divide 10 with 7, the remainder will be 3 thats the value which ℅ operator returns