Skip to content

Instantly share code, notes, and snippets.

@yhaskell
Created May 22, 2018 09:59
Show Gist options
  • Save yhaskell/b3355d428bff6c5af8b88812ceedb615 to your computer and use it in GitHub Desktop.
Save yhaskell/b3355d428bff6c5af8b88812ceedb615 to your computer and use it in GitHub Desktop.
#include <iostream>
int main() {
for (int i = 1; i <= 100; i++) {
if (i % 15 == 0)
cout << "FizzBuzz ";
else if (i % 3 == 0)
cout << "Fizz ";
else if (i % 5 == 0)
cout << "Buzz";
else
cout << i << " ";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment