For your next job interview
-
@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 :EOFApparently I wrote this back in 2007. I have no memory of doing so, or why I did it :~.
Software Zen:
delete this;
Well, that's a pretty decent FizzBuzz implementation.
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
Well, that's a pretty decent FizzBuzz implementation.
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easierThanks. I was dumpster diving in my archive, looking for something else, and found that :-O.
Software Zen:
delete this;
-
@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 :EOFApparently I wrote this back in 2007. I have no memory of doing so, or why I did it :~.
Software Zen:
delete this;
I kinda like the Term "FizzBuzz" :thumbsup::laugh:
cheers Marco Bertschi
Software Developer & Founder SMGT Web-Portal CP Profile | My Articles | Twitter | Facebook | SMGT Web-Portal
-
I kinda like the Term "FizzBuzz" :thumbsup::laugh:
cheers Marco Bertschi
Software Developer & Founder SMGT Web-Portal CP Profile | My Articles | Twitter | Facebook | SMGT Web-Portal
http://en.wikipedia.org/wiki/Fizz_buzz[^]
Software Zen:
delete this;
-
@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 :EOFApparently I wrote this back in 2007. I have no memory of doing so, or why I did it :~.
Software Zen:
delete this;
Oh dear, I had to capture the FizzBuzz thing for my sig...
cheers Marco Bertschi
Software Developer & Founder SMGT Web-Portal CP Profile | Twitter | Facebook | SMGT Web-Portal
FizzBuzz - Gary Wheeler
-
@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 :EOFApparently I wrote this back in 2007. I have no memory of doing so, or why I did it :~.
Software Zen:
delete this;
-
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;
-
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;
-
@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 :EOFApparently I wrote this back in 2007. I have no memory of doing so, or why I did it :~.
Software Zen:
delete this;
-
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;
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.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
http://en.wikipedia.org/wiki/Fizz_buzz[^]
Software Zen:
delete this;
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
-
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.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
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;