Most interesting fizz buzz

How short can you go?

 for x in range(100): print x%3/2*'Fizz'+x%5/4*'Buzz' or x+1

[EDIT: I changed the title because of what Ztrain said]

In C# my best is 105 characters. Only 12 shorter than the alternative using if/else. Here it is:

for(int i=1;i<101;i++)Console.WriteLine((i%3==0&&i%5==0)?"FizzBuzz":(i%3==0)?"Fizz":(i%5==0)?"Buzz":i+"");

 

#include &lt;iostream&gt;

#define _ std::cout&lt;&lt;

int main(){for(int i=0;i++&lt;100;){(!(i%3)&amp;&amp;_"Fizz")|(!(i%5)&amp;&amp;_"Buzz")||_ i,_"\n";}}

 

122 claracters includeing pre compilation / main function

only the for loop (no include, define, or main), 71 characters

also, i would like to change this to "most interesting" fizzbuzz.... as i would much rather read over people's code where they long way arround, by finding the pointer to the string buffer and manualy changing bits then someone who has one less character of code.

So the challenge is to make it interesting, not short now? Hm, okay . . .give me a minute.

#include <iostream>


#include <string>

using namespace std;

class ROFL
{
public:

string value1;
string value2;
void ( method)(void * obj);

ROFL();

string getV1();

static void doNothing(void * obj);
};

class LAWL
{
public:
static const int FOO = 1;
static const int BAR = 2;
static const int BAZ = 4;
static const int WUG = 8;

string hello;
string world;
void ( doHello)(LAWL * obj);

LAWL();

void * operator new(size_t size);

void tower(int i);
const char * doTower(int i, int j, int k);

static void doHe1lo(LAWL * obj);
};

ROFL::ROFL()
{
method = &doNothing;
}

void ROFL::doNothing(void * obj)
{
string s = ((ROFL *) obj)->getV1();
((LAWL *) obj)->tower(1);
}

string ROFL::getV1()
{
value1[0] += 'h' - 'j' - 32;
value1[1] += 'k' - 'g';
value1[2] += 'u' - 'g';
value1[3] = value1[2];
value2 = value1 = value1.substr(0, 4);

value2[0] += 'd' - 'h';
value2[1] += 'w' - 'k';
value2[2] = value1[2];
value2[3] = value1[3];

return "hello";
}

void * LAWL::operator new(size_t size)
{
return (void *) new ROFL;
}

LAWL::LAWL()
{
hello = "hello";
world = "world";
}

void LAWL::doHe1lo(LAWL * obj)
{
cout << obj->hello << " " << obj->world << "!" << endl;
}

void LAWL::tower(int i)
{
doTower(0, 0, i);
tower(i + (FOO | BAR | BAZ | WUG));
}

const char * LAWL::doTower(int i, int j, int k)
{
static const char * NOTHING = "";
int hello = BAR;
int world = BAZ;
int LAWL = FOO | BAR | BAZ | WUG;

if ((hello & i) && (world & j))
cout << this->hello << this->world << endl;
else if (hello & i)
{
cout << this->hello << endl;
cout << doTower(0, j + 1, k + 1);
}
else if (world & j)
{
cout << this->world << endl;
cout << doTower(i + 1, 0, k + 1);
}
else
{
cout << k << endl;
cout << doTower(i + 1, j + 1, k + 1);
}

return NOTHING;
}

int main()
{
LAWL * h = new LAWL;
h->doHello(h);
}

//I put it in quotes so it looks a little bit better; I hope that's okay. Just ignore this part. LAWL.

Can I make it obfuscated, and are there any restrictions on what language I may use?

 

or.... we can incite a pool closure by 4chan.... it's international aids day

What? xD

 

Okay sir. You win. I have no idea how this relates to fizz buzz. @_@  I'm an idiot, lawl.

really doesn't

BrainFuck:

>++++++++++[<++++++++++>-]<[>+>[-]>++++++++++[<++++++++++>-]<+<<[->>->+<<<]>>>
[-<<<+>>>]<>>+++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[-]]>[-]
<<<[[-]++++++++++[>++++++++++<-]>++.+++.[-]<[-]+++++++++++[>+++++++++++<-]>+..
[-]<[-]<<[-]>>]<>>+++++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[
-]]>[-]<<<[[-]+++++++++[>+++++++++++<-]>-.[-]<[-]+++++++++[>+++++++++++++<-]>.
+++++..[-]<[-]<<[-]>>]<<[[-]>>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[
>++++++++[<++++++>-]<.[-]]<>++++++++[<++++++>-]<.[-]<<<]>[-]++++++++++.[-]<[-]
<-]

#define x(b) putchar(a+=b);
main(a, b, c){
a = 70;
for( b = c = 1; b <= a * 2 - 40 && !(c = 0); b++)
{
if(!(b % ( a / 23)))
{
x(0)x(35)x(17)x(0);
c++;
}
if(!(b % ( a / ( 14 + c * 9))))
{
x(-56 + !c * 52)x(51)x(5)x(0);
c++;
}
if(c)
{
x(-112);
a+=60;
}
else printf("%i\n",b);
}
}

It ruined my formating, I'm so sorry. I didn't obfuscate it though, so it isn't that hard. :/ Stupid formating.

I think it is beautiful though. :)

Can my program not conform with the normal C standard? O_o My program only compiles with certain compilers, but does not work for GCC. T_T

fixed it for you :)

http://pastebin.com/xtdqzETf

 

also, you can do code tags (code) (/code) but with [] not ().

however, they are half broken right now, as a new line doesnt make a new line, you just get a </br> in your code. so, if you do code tags for every line, it will work :p

YAY I will use that website from now on, since I really am too lazy to do [code] for every single line especially my first attempt at a super FizzBuzz which is waaaaaaaaaay overly complicated XD Which one is better? 0.o