Skip to content

Instantly share code, notes, and snippets.

@genbtc
Created September 21, 2018 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genbtc/739efe83fbcd00bb1530536c3d5fdd20 to your computer and use it in GitHub Desktop.
Save genbtc/739efe83fbcd00bb1530536c3d5fdd20 to your computer and use it in GitHub Desktop.
FizzBuzz test implementation done in C++
//September 21, 2018 - genBTC (GPL License)
#include <iostream>
using namespace std;
int main() {
for (int i = 1; i < 101; i++) {
if (i % 15 == 0)
cout << "FizzBuzz" << endl;
else if (i % 5 == 0)
cout << "Buzz" << endl;
else if (i % 3 == 0)
cout << "Fizz" << endl;
else
cout << i << endl;
}
return 0;
}
@genbtc
Copy link
Author

genbtc commented Sep 21, 2018

Fizz Buzz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment