RosettaCodeData/Task/FizzBuzz/REXX/fizzbuzz-2.rexx
2016-12-05 22:15:40 +01:00

10 lines
1,016 B
Rexx

/*REXX program displays numbers 1 ──► 100 (some transformed) for the FizzBuzz problem.*/
/*╔═══════════════════════════════════╗*/
do j=1 to 100 /*║ ║*/
select /*║ ║*/
when j//15==0 then say 'FizzBuzz' /*║ The divisors (//) of the WHENs ║*/
when j//5 ==0 then say ' Buzz' /*║ must be in descending order. ║*/
when j//3 ==0 then say ' Fizz' /*║ ║*/
otherwise say right(j, 8) /*╚═══════════════════════════════════╝*/
end /*select*/
end /*j*/ /*stick a fork in it, we're all done. */