Skip to content

Instantly share code, notes, and snippets.

@iitalics
Created July 2, 2020 21:58
Show Gist options
  • Save iitalics/e8e871f5bc03e84df341fd6e6c016c2e to your computer and use it in GitHub Desktop.
Save iitalics/e8e871f5bc03e84df341fd6e6c016c2e to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
int n;
int fb;
void f() { fb |= 1; }
void b() { fb |= 2; }
void nop() {}
void number() { printf("%d\n", n); }
void fizz() { printf("Fizz\n"); }
void buzz() { printf("Buzz\n"); }
void fizzbuzz() { printf("FizzBuzz\n"); }
typedef void (*fn)(int);
fn fuck[] = { nop, exit };
fn shit[] = { f, nop, nop };
fn piss[] = { b, nop, nop, nop, nop };
fn cum[] = { number, fizz, buzz, fizzbuzz };
int main(void)
{
n = 0;
loop:
n++;
fb = 0;
fuck[n / 100](0);
shit[n % 3](0);
piss[n % 5](0);
cum[fb](0);
goto loop;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment