number = 0
do
// if the remainder of the number when divided by 2 is 0, the number must be even
if Mod(number, 2) = 0
Print(Str(number) + " is even")
// if the remainder is 1, then it must be odd
else
Print(Str(number) + " is odd")
endif
// increment the number if the user touches the screen
if GetPointerPressed()
inc number
endif
// update the screen
Sync()
loop
Help make AGK better by submitting an example for this command! (All examples are subject to approval)
number = 0 do // if the remainder of the number when divided by 2 is 0, the number must be even if Mod(number, 2) = 0 Print(Str(number) + " is even") // if the remainder is 1, then it must be odd else Print(Str(number) + " is odd") endif // increment the number if the user touches the screen if GetPointerPressed() inc number endif // update the screen Sync() loop