This content has been marked as final.
Show 4 replies

1. Re: How to calculate Remainder/Modulo from two integers
paul.enkelaar Dec 14, 2011 3:30 PM (in response to KaiEilert)1 of 1 people found this helpfulHi
As part of your calculation, you may need to import System.Math as well, and use the DivRem method. See http://msdn.microsoft.com/enus/library/yda5c8dx.aspx#Y856 for details. I haven't actually tried it, but hopefully that may set you on the right track.
Cheers
Paul

2. Re: How to calculate Remainder/Modulo from two integers
JulianWigman Dec 15, 2011 12:57 AM (in response to KaiEilert)Hi
I'd have thought the easiest way was to use the MOD operator as this returns the remainder.
So in a calculation:
Remainder of 10 divided by 3
would be:
10 % 3
Simples
Julian

3. Re: How to calculate Remainder/Modulo from two integers
KaiEilert Dec 15, 2011 1:17 AM (in response to JulianWigman)Thank you Julian.
That did the job!

4. Re: How to calculate Remainder/Modulo from two integers
JulianWigman Dec 16, 2011 4:19 AM (in response to KaiEilert)Thats good. remember to flag as solution.