OneManPen Posted February 22, 2012 Posted February 22, 2012 I'm writing a small bit of code for a large project. What it does, is gets the remainder left over from a division problem... for example 223/200 and it will give you 23. I wrote a working program... but if I use large numbers it fails... e.g. 4561698 .It seems to fail on $calc3 = $calc1 - $calc2. I see no logical reason why it's doing this... So thanks in advance for any help. $input = InputBox("Input a random number", "Input any random number") $input2 = InputBox("Input the number to divide it by", "Input any number to divide it by") If $input < $input2 Then MsgBox(0, "Cannot divide", "This program cannot calculate this remainder") Exit EndIf $calc1 = $input / $input2 $calc2 = Int($calc1) $calc3 = $calc1 - $calc2 $calc3 = $calc3 * $input2 MsgBox(0, "Result", $calc3)
JohnOne Posted February 22, 2012 Posted February 22, 2012 $rmdr = Mod(22366435,20930) MsgBox(0,0,$rmdr) ssamko and Kambiz 2 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
OneManPen Posted February 22, 2012 Author Posted February 22, 2012 (edited) **EDIT** Ah... I see, I couldn't find it when I was looking through the help file I guess I need to learn how to look harder. Edited February 22, 2012 by SleeperCell42
Xandy Posted February 22, 2012 Posted February 22, 2012 SleeperCell42 said: Ah... I see, I couldn't find it when I was looking through the help file I guess I need to learn how to look harder.There are times when given all the information, we're right back at square one, wondering where to look. I find myself there again from time to time. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now