36
\$\begingroup\$

Inspired by Hosch250, TopinFrassi, Legato and the recent milestone of having our 100th question on Code Review I decided to add an ArnoldC FizzBuzz to the collection.

I haven't found any best practices about the language, but I assume the code needs to be VERBOSE. For those unfamiliar with the language, a small excerpt of the keywords:

True NO PROBLEMO ModuloOperator I LET HIM GO DeclareInt HEY CHRISTMAS TREE AssignVariable GET TO THE CHOPPER 

The challenge itself doesn't need introduction. Write all numbers from 1 up till and including 100, but:

  • Write Fizz instead of the number when divisible by 3
  • Write Buzz instead of the number when divisible by 5
  • Write FizzBuzz instead of the number when divisible by 15
LISTEN TO ME VERY CAREFULLY modulo I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE dividend I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE divisor GIVE THESE PEOPLE AIR HEY CHRISTMAS TREE quotient YOU SET US UP 0 HEY CHRISTMAS TREE remainder YOU SET US UP 0 HEY CHRISTMAS TREE product YOU SET US UP 0 GET TO THE CHOPPER quotient HERE IS MY INVITATION dividend HE HAD TO SPLIT divisor ENOUGH TALK GET TO THE CHOPPER product HERE IS MY INVITATION divisor YOU'RE FIRED quotient ENOUGH TALK GET TO THE CHOPPER remainder HERE IS MY INVITATION dividend GET DOWN product ENOUGH TALK I'LL BE BACK remainder HASTA LA VISTA, BABY LISTEN TO ME VERY CAREFULLY divisible I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE dividend I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE divisor GIVE THESE PEOPLE AIR HEY CHRISTMAS TREE result YOU SET US UP 0 GET YOUR ASS TO MARS result DO IT NOW modulo dividend divisor HEY CHRISTMAS TREE isZero YOU SET US UP 0 GET TO THE CHOPPER isZero HERE IS MY INVITATION result YOU ARE NOT YOU YOU ARE ME 0 ENOUGH TALK I'LL BE BACK isZero HASTA LA VISTA, BABY IT'S SHOWTIME HEY CHRISTMAS TREE maxValue YOU SET US UP @NO PROBLEMO HEY CHRISTMAS TREE n YOU SET US UP 0 HEY CHRISTMAS TREE divisible YOU SET US UP @NO PROBLEMO HEY CHRISTMAS TREE multiple YOU SET US UP @NO PROBLEMO STICK AROUND maxValue GET TO THE CHOPPER n HERE IS MY INVITATION n GET UP 1 ENOUGH TALK GET TO THE CHOPPER maxValue HERE IS MY INVITATION 100 LET OFF SOME STEAM BENNET n ENOUGH TALK GET YOUR ASS TO MARS multiple DO IT NOW divisible n 15 BECAUSE I'M GOING TO SAY PLEASE multiple TALK TO THE HAND "FizzBuzz" BULLSHIT GET YOUR ASS TO MARS multiple DO IT NOW divisible n 5 BECAUSE I'M GOING TO SAY PLEASE multiple TALK TO THE HAND "Buzz" BULLSHIT GET YOUR ASS TO MARS multiple DO IT NOW divisible n 3 BECAUSE I'M GOING TO SAY PLEASE multiple TALK TO THE HAND "Fizz" BULLSHIT TALK TO THE HAND n YOU HAVE NO RESPECT FOR LOGIC YOU HAVE NO RESPECT FOR LOGIC YOU HAVE NO RESPECT FOR LOGIC CHILL YOU HAVE BEEN TERMINATED 
\$\endgroup\$
2
  • 9
    \$\begingroup\$ HEY CHRISTMAS TREE, YOU SET US UP. God I love that language \$\endgroup\$ Commented Dec 4, 2015 at 14:55
  • 12
    \$\begingroup\$ Instead of "fizz" and "buzz" you should use "Arnold" and "Schwarzenegger" \$\endgroup\$ Commented Dec 4, 2015 at 14:59

1 Answer 1

18
\$\begingroup\$

There's incorrect/inconsistent indentation in:

HEY CHRISTMAS TREE result YOU SET US UP 0 

and

HEY CHRISTMAS TREE isZero YOU SET US UP 0 

The ArnoldC wiki says you should declare 0s and 1s as the "macros" @I LIED and @NO PROBLEMO

HEY CHRISTMAS TREE isZero YOU SET US UP @I LIED 

In your method divisible, the end of method statement is not on the same indentation as the start declaration.


The indentation in these two blocks is two vs four:

IT'S SHOWTIME HEY CHRISTMAS TREE maxValue 

and:

LISTEN TO ME VERY CAREFULLY divisible I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE dividend 

You ought to stick to one consistently.


IT'S SHOWTIME HEY CHRISTMAS TREE maxValue YOU SET US UP @NO PROBLEMO 

There we go! Using the macros!

Oh, wait...

HEY CHRISTMAS TREE n YOU SET US UP 0 

Never mind...


And again...

 HERE IS MY INVITATION n GET UP 1 
\$\endgroup\$
1
  • 4
    \$\begingroup\$ I'm fairly certain it can print both Fizz and Buzz when encountering multiples of 3 and 5, but I'll get back to you about that when I'm back at home. \$\endgroup\$ Commented Dec 14, 2015 at 12:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.