Skip to content

Instantly share code, notes, and snippets.

@zawie
Created September 5, 2020 20:39
Show Gist options
  • Save zawie/d8f54af99c8578fb739080a11135c7d1 to your computer and use it in GitHub Desktop.
Save zawie/d8f54af99c8578fb739080a11135c7d1 to your computer and use it in GitHub Desktop.
Just seeing how GiHub Gist's work
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