News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

FizzBuzz

Started by Gunner, October 17, 2011, 12:18:42 AM

Previous topic - Next topic

Gunner

Didn't find this one here, so what can you come up with?  A little fun challenge.  Found it in another forum, seen it done in c to ruby not asm.

"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"."
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

drizz

Quote from: Gunner on October 17, 2011, 12:18:42 AMchallenge
not really  :'(

Quote from: Gunner on October 17, 2011, 12:18:42 AMseen it done in c to ruby not asm.

I reckon you'll enjoy this asm code  :lol

i = 1
rept 100
if ((i mod 3) eq 0) and ((i mod 5) eq 0)
echo FizzBuzz
elseif (i mod 3) eq 0
echo Fizz
elseif (i mod 5) eq 0
echo Buzz
else
%echo @CatStr(%(i))
endif
i = i + 1
endm
The truth cannot be learned ... it can only be recognized.

dedndave

what does it do ?
draw a pic of a naked girl or something ?

jj2007

Quote from: drizz on October 17, 2011, 12:35:18 AM
I reckon you'll enjoy this asm code  :lol

Pure MasmTM rocks :U