Recap: FizzBuzz
Combine if/else, if/else if, and for loops into a single challenge
Mission: Tape Reel Diagnostics
A diagnostic program checks 20 magnetic tape reels, numbered from 1 to 20, at a computing center. Each reel gets a label based on divisibility patterns set by the system administrator.
- Loop through numbers from 1 to 20
- If the number is divisible by both 3 and 5, print "X: fizzbuzz"
- If divisible by 3 only, print "X: fizz"
- If divisible by 5 only, print "X: buzz"
- Otherwise, print "X: normal"
- At the end, print how many fizzbuzz reels you found
Output
1: normal
2: normal
3: fizz
4: normal
5: buzz
6: fizz
7: normal
8: normal
9: fizz
10: buzz
11: normal
12: fizz
13: normal
14: normal
15: fizzbuzz
16: normal
17: normal
18: fizz
19: normal
20: buzz
FizzBuzz count: 1