|
@echo off
for /L %%I in (1,1,100) do call :FizzBuzz %%I
goto :EOF
:FizzBuzz
set I=%1
set /a T3=I %% 3
set /a T5=I %% 5
set /a T35=T3 + T5
if not %T35%==0 goto FizzBuzz5
echo FizzBuzz
goto :EOF
:FizzBuzz5
if not %T5%==0 goto FizzBuzz3
echo Buzz
goto :EOF
:FizzBuzz3
if not %T3%==0 goto FizzBuzzEcho
echo Fizz
goto :EOF
:FizzBuzzEcho
echo %I%
goto :EOF Apparently I wrote this back in 2007. I have no memory of doing so, or why I did it .
Software Zen: delete this;
|
|
|
|
|
And that is because you got selected?
Happy Programming
|
|
|
|
|
No. I've been at my current position for 23 years.
Software Zen: delete this;
|
|
|
|
|
Well, that's a pretty decent FizzBuzz implementation.
|
|
|
|
|
Thanks. I was dumpster diving in my archive, looking for something else, and found that .
Software Zen: delete this;
|
|
|
|
|
I kinda like the Term "FizzBuzz"
|
|
|
|
|
|
Not to be confused with http://en.wikipedia.org/wiki/Bucks_Fizz_(band)[^] (oh man, I think I just got "Making Your Mind Up" stuck in my head and I don't think I have heard it since the 80's).
I just thought about this: www.zuberfizz.com[^]. I never tried this stuff, but back in 2006 I went on a road trip which took me through Durango (Colorado) and by request from a colleague of mine, I brought a couple of cases back to San Diego.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
Oh dear, I had to capture the FizzBuzz thing for my sig...
|
|
|
|
|
I guess I need to get out of programming. My brain sees this and then shuts down. I don't want to think and figure it out. My brain is tired.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I would worry more if you wanted to figure it out.
Can you imagine how frightened I am, given that I wrote this six years ago, and I don't remember why?
Software Zen: delete this;
|
|
|
|
|
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
No, but I can imagine how frightened I would be beng in the same job for 23 years!!!!!!!!!
FBOB That's a long time!
About 8 years is my record.
|
|
|
|
|
I've worked on a lot of different things in that time. For the most part it's been a pretty fun ride.
Software Zen: delete this;
|
|
|
|
|
I love this. Must open a cmd window just for old times sake
|
|
|
|