Created
September 5, 2020 20:39
-
-
Save zawie/d8f54af99c8578fb739080a11135c7d1 to your computer and use it in GitHub Desktop.
Just seeing how GiHub Gist's work
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
int FizzBuzz() { | |
int x,y,n; | |
std::cin >> x >> y >> n; | |
for (int i=1; i <= n; i++) { | |
if (i % x == 0){ | |
std::cout << "Fizz"; | |
} | |
if (i % y == 0) { | |
std::cout << "Buzz"; | |
} | |
if (i%y + i%x > 0) { | |
std::cout << i; | |
} | |
std::cout << std::endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment