Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() {
- for (int i = 0; i < 100; i++) {
- if (i != 0)
- switch (i % 15) {
- case 3:
- case 6:
- case 9:
- case 12:
- print("Fizz");
- break;
- case 5:
- case 10:
- print("Buzz");
- break;
- case 0:
- print("FizzBuzz");
- break;
- default:
- print(i);
- }
- else
- print(i);
- }
- }
Add Comment
Please, Sign In to add comment