| 1 | // A sample program for getting minidumps on Windows. |
|---|---|
| 2 | |
| 3 | #include <iostream> |
| 4 | |
| 5 | bool |
| 6 | fizz(int x) |
| 7 | { |
| 8 | return x % 3 == 0; |
| 9 | } |
| 10 | |
| 11 | bool |
| 12 | buzz(int x) |
| 13 | { |
| 14 | return x % 5 == 0; |
| 15 | } |
| 16 | |
| 17 | int |
| 18 | main() |
| 19 | { |
| 20 | int *buggy = 0; |
| 21 | |
| 22 | for (int i = 1; i <= 100; ++i) |
| 23 | { |
| 24 | if (fizz(x: i)) std::cout << "fizz"; |
| 25 | if (buzz(x: i)) std::cout << "buzz"; |
| 26 | if (!fizz(x: i) && !buzz(x: i)) std::cout << i; |
| 27 | std::cout << '\n'; |
| 28 | } |
| 29 | |
| 30 | return *buggy; |
| 31 | } |
| 32 |
