Created
September 21, 2018 15:22
-
-
Save genbtc/739efe83fbcd00bb1530536c3d5fdd20 to your computer and use it in GitHub Desktop.
FizzBuzz test implementation done in C++
This file contains hidden or 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
//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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fizz Buzz