Skip to content

Instantly share code, notes, and snippets.

@GabrielFreeze
Last active May 8, 2023 12:52
Show Gist options
  • Save GabrielFreeze/7134a3574bf82e416325d037cd00316d to your computer and use it in GitHub Desktop.
Save GabrielFreeze/7134a3574bf82e416325d037cd00316d to your computer and use it in GitHub Desktop.
FizzBuzz
#include <stdio.h>
#include <inttypes.h>
int main() {
for (int i=1 ; i<=100; i++) {
uint32_t Fizz[4] = {i,0x2A447,0x2A51F,0x2A51A447};
uint8_t Buzz = ((!(i%5)) << 1) | (!(i%3));
if (!Buzz) printf("%d\n\r",Fizz[Buzz]);
else while(Fizz[Buzz]>>=3) putc(0xA75427A6946 >> ((Fizz[Buzz]&7)<<0B11) & 255ULL,stdout);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment