What is the difference between MOD sign and divide sign?? | Sololearn: Learn to code for FREE!

0

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

3/14/2017 7:13:41 PM

Rakshak Kapoor

2 Answers

New Answer

+2

Mod sign make the division then return the remainder, but divide sign returns the answer of the division.

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