Print numbers from 1 to 100, but:
if the number is even, print "Fizz" instead of the number
if the number is divisible by three, print "Buzz" instead of the number
if the number is even AND divisible by three, print "FizzBuzz" instead of the number
here's my solution:
SetWorkingDir %A_ScriptDir%
filedelete, testdoc.txt
var = 1
while (var < 101)
{
if (mod( var, 2) = 0) && ( mod( var, 3) = 0)
fileappend, FizzBuzz`n, testdoc.txt
else if ( mod( var, 2) = 0)
fileappend, Fizz`n, testdoc.txt
else if ( mod( var, 3) = 0)
fileappend, Buzz`n, testdoc.txt
else
fileappend, %var%`n, testdoc.txt
var += 1
}variation from <!-- m -->http://www.codinghor... ... ogram.html<!-- m -->




