Feb 13, 2002 #1 rbauerle Programmer Oct 16, 2001 48 BR How can I test if the rest of a division is zero? For example: 6/3=2 rest=0 or 6/4=1 rest=2 Thanks a lot
How can I test if the rest of a division is zero? For example: 6/3=2 rest=0 or 6/4=1 rest=2 Thanks a lot
Feb 13, 2002 #2 link9 Programmer Nov 28, 2000 3,387 US You need the modulus operator, which in most languages is % but for some reason, MS decided to make it mod so: 6 mod 3 = 0 and 6 mod 2 = 0 but 6 mod 4 = 2 good luck! paul Upvote 0 Downvote
You need the modulus operator, which in most languages is % but for some reason, MS decided to make it mod so: 6 mod 3 = 0 and 6 mod 2 = 0 but 6 mod 4 = 2 good luck! paul