By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,504 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,504 IT Pros & Developers. It's quick & easy.

Mod

P: n/a
RN1
79 Mod 92 evaluates to 79

156 Mod 249 evaluates to 156

So while using the Mod operator, if the first number is less than the
second number, will the result be ALWAYS EQUAL to the first number?
Dec 14 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
RN1 wrote:
79 Mod 92 evaluates to 79

156 Mod 249 evaluates to 156

So while using the Mod operator, if the first number is less than the
second number, will the result be ALWAYS EQUAL to the first number?
Yes. Think back to second or third grade when learning about division.
If you divide 79 by 92, you got a remainder, right? 92 gazinto 79 zero
times with a remainder of 79.
That's the modulus, or mod for short.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Dec 14 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.