pradeep's Avatar, Join Date: Apr 2005
Team Leader
Code: Java
for(int i = 0 ; i <= 100 ; i++)
{
    if(i % 3 == 0 && i % 5 == 0)
    {
        System.out.println("FizzBuzz");
    }
    else if(i % 3 == 0)
    {
        System.out.println("Fizz");
    }
    else if(i % 5 == 0)
    {
        System.out.println("Buzz");
    }
    else
    {
        System.out.println(i);
    }
}
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Quote:
Originally Posted by SaswatPadhi View Post
Finalllyyyy... After struggling with BrainF*ck for 3 hours, I conclude that the language truly justifies its name !
Heh, well done there. I was trying to put a Brainf*ck one together but gave up after well over 3 hours.
SaswatPadhi's Avatar, Join Date: May 2009
~ Б0ЯИ Τ0 С0δЭ ~
Thanx !

Programming with Brainf*ck requires a lot of patience. While writing this code, many times it came to me "Why should I write it ?". I was ready to give up, but then I thought I had no better way to utilize my time ! But, BF truely f*cks Brain.

Last edited by SaswatPadhi; 1Jun2009 at 18:32..
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Check this out guys http://golf.shinh.org/p.rb?FizzBuzz
SaswatPadhi's Avatar, Join Date: May 2009
~ Б0ЯИ Τ0 С0δЭ ~
OMG !!!

Whitespace, Befunge !
SaswatPadhi's Avatar, Join Date: May 2009
~ Б0ЯИ Τ0 С0δЭ ~
The program in Mathematica 7
Code: Mathematica
For[i = 1, i < 101, i++, If[Mod[i, 3] == 0, If[Mod[i, 5] == 0, Print["FIZZBUZZ"], Print["FIZZ"]], If[Mod[i, 5] == 0, Print["BUZZ"], Print[i]]]]