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? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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?

16th Dec 2015, 7:41 AM
Den Boyko
Den Boyko - avatar
3 Answers
+ 6
a-b=7 10%7=3 so c is 3 % is reaminder operator.
28th Aug 2016, 7:08 PM
Celal Aybar
Celal Aybar - avatar
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 ☺
5th Jan 2016, 12:40 AM
Emad Aljuhani
Emad Aljuhani - avatar
0
divide 10 with 7, the remainder will be 3 thats the value which ℅ operator returns
19th Sep 2016, 4:45 PM
Mohammad Hussain Anwer
Mohammad Hussain Anwer - avatar