Computer Science Canada Exiting Loops |
Author: | imdesigner [ Sun Nov 11, 2007 8:15 pm ] |
Post subject: | Exiting Loops |
hey, in a program i am currently working on in Turing i need to exit a loop when it gets to 12, then 24, then 36 and so on, but i dont want to type all that "exit when counter =" stuff, could anyone tell me if there is an easier to put that into Turing? |
Author: | Clayton [ Sun Nov 11, 2007 8:19 pm ] |
Post subject: | RE:Exiting Loops |
So just check when your counter is a multiple of 12. When counter mod 12 = 0, then counter is a multiple of 12. |
Author: | imdesigner [ Sun Nov 11, 2007 8:21 pm ] |
Post subject: | Re: RE:Exiting Loops |
Clayton @ Sun Nov 11, 2007 8:19 pm wrote: So just check when your counter is a multiple of 12. When counter mod 12 = 0, then counter is a multiple of 12.
thank you very much, i didnt realize i would get a response that quickly |