What is the difference between MOD sign and divide sign?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between MOD sign and divide sign??

14th Mar 2017, 7:13 PM
Rakshak Kapoor
2 Answers
+ 2
Mod sign make the division then return the remainder, but divide sign returns the answer of the division.
14th Mar 2017, 7:20 PM
Mohamad Abdelhafiz
Mohamad Abdelhafiz - avatar
0
both divide the numbers, modulus returns the remainder, so (assumung int values which drop any decimal remainder ) 8/3=2 8%3=2 but 10/3=3 10%3=1 hope that makes sense
14th Mar 2017, 9:34 PM
William La Flamme
William La Flamme - avatar