Last active
November 15, 2021 00:43
-
-
Save Leonetienne/f1049ccae4947c70bda9db51fa8c62a8 to your computer and use it in GitHub Desktop.
Challange to create the shortest* FizzBuzz (1 <= n <= 20) program that'll compile as-is with a C++ compiler without special options.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(){for(int i=0;i++<20;)if(i%3&&i%5)printf("%d\n",i);else printf("%s%s\n",i%3?"":"Fizz",i%5?"":"Buzz");} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Every char counts. Even spaces and linebreaks. | |
Current best: | |
129 chars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment