Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* REXX */
- collector3 = 3
- collector5 = 5
- fizz. = 0
- buzz. = 0
- fizz.3 = collector3
- buzz.5 = collector5
- DO count=1 TO 100
- SELECT
- WHEN count = fizz.count & count = buzz.count THEN
- DO
- say 'FizzBuzz'
- collector3 = collector3 + 3
- collector5 = collector5 + 5
- fizz.collector3 = collector3
- buzz.collector5 = collector5
- END
- WHEN count = fizz.count THEN
- DO
- say 'Fizz'
- collector3 = collector3 + 3
- fizz.collector3 = collector3
- END
- WHEN count = buzz.count THEN
- DO
- say 'Buzz'
- collector5 = collector5 + 5
- buzz.collector5 = collector5
- END
- OTHERWISE
- say count
- END
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement