Last active
August 10, 2016 20:10
-
-
Save spaghetti-/26b6a1a47536b401f368a46767da8d9f to your computer and use it in GitHub Desktop.
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
| #include <iostream> | |
| struct FizzBuzz | |
| { | |
| FizzBuzz() : i(1) { delete this; } | |
| ~FizzBuzz() | |
| { | |
| for (; i <= 100; i++) { | |
| if (!(i % 3)) std::cout << "Fizz"; | |
| if (!(i % 5)) std::cout << "Buzz"; | |
| else if (i % 3) std::cout << i; | |
| std::cout << std::endl; | |
| } | |
| } | |
| int i; | |
| }; | |
| int main(void) { | |
| auto f = new FizzBuzz(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment