Skip to content

Instantly share code, notes, and snippets.

@Grumblesaur
Last active November 2, 2015 06:18
Show Gist options
  • Save Grumblesaur/f8094545d57016458f6e to your computer and use it in GitHub Desktop.
Save Grumblesaur/f8094545d57016458f6e to your computer and use it in GitHub Desktop.
Obscured and golfed fizzbuzz in C
#include "stdio.h"
#include "string.h"
#define z 122
int main(){
char f[]={70,105,z,z,0},b[]={66,117,z,z,0},i=1,B[z],g;
for(i=1;i<=100;i++){
g=0;if(i%3<1)strcpy(B,f),g=1;
if(i%5<1){if(g>0)strcat(B,b);else if(g<1)strcpy(B,b),g=1;}
if(g<1)printf("%d\n",i);
else printf("%s\n",B);
}
return 0;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment