19 Jan 2010 at 20:13 #1 Conrad11 Conrad11 Soldato Joined 12 Jun 2005 Posts 5,361 If I do Code: x = n MOD 100 There resultant integer will be in the range 1-99 inclusive, correct?...as its the remainder when you divide it?
If I do Code: x = n MOD 100 There resultant integer will be in the range 1-99 inclusive, correct?...as its the remainder when you divide it?
19 Jan 2010 at 20:22 #2 Spyhop Spyhop Soldato Joined 16 May 2005 Posts 6,509 Location Cold waters Edit: Oh dear, didn't mention the zero case. See below. Last edited: 19 Jan 2010
19 Jan 2010 at 20:23 #3 tntcoder tntcoder Soldato Joined 7 Apr 2004 Posts 4,212 Range of 0-99. 0 == exact division
19 Jan 2010 at 20:23 #4 daz daz Soldato Joined 18 Oct 2002 Posts 24,081 Location Bucks Isn't it called "modulo"
19 Jan 2010 at 20:30 #5 Conrad11 Conrad11 Soldato OP Joined 12 Jun 2005 Posts 5,361 daz said: Isn't it called "modulo" Click to expand... Yeah I think your right....sorry.