FizzBuzz

“Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.”

well this was some task which lot of begin (and advanced programmers have some problems), so here is Actionscript implementation:

1
2
for (var i:int=1; i<101; i++)
     trace((i%15==0)?'FIZZBAZZ':(i%3==0)?'FIZZ':(i%5==0)?'BAZZ':i);

source: http://www.devblogi.pl/2010/01/dlaczego-programisci-nie-potrafia.html