Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,9 +1,8 @@
/*REXX program displays numbers 1 ──► 100 for the FizzBuzz problem. */
do j=1 to 100; z=j
if j//3 ==0 then z='Fizz'
if j//5 ==0 then z='Buzz'
if j//(3*5)==0 then z='FizzBuzz'
do j=1 to 100; z=j /*╔═════════════════════════════╗*/
if j//3 ==0 then z='Fizz' /*║ The IFs must be in ║*/
if j//5 ==0 then z='Buzz' /*║ ascending order.║*/
if j//(3*5)==0 then z='FizzBuzz' /*╚═════════════════════════════╝*/
say right(z,8)
end /*j*/
/*stick a fork in it, we're done.*/
end /*j*/ /*stick a fork in it, we're done.*/

View file

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

View file

@ -1,8 +1,8 @@
/*REXX program displays numbers 1 ──► 100 for the FizzBuzz problem. */
do n=1 for 100; _=
if n//3 ==0 then _= 'Fizz'
if n//5 ==0 then _=_'Buzz'
say right(word(_ n,1),8)
end /*n*/
/*stick a fork in it, we're done.*/
do n=1 for 100; _=
if n//3 ==0 then _=_'Fizz'
if n//5 ==0 then _=_'Buzz'
/* if n//7 ==0 then _=_'Jazz' */ /*◄───note that this is a comment*/
say right(word(_ n,1),8)
end /*n*/ /*stick a fork in it, we're done.*/

View file

@ -0,0 +1,6 @@
/*REXX program displays numbers 1 ──► 100 for the FizzBuzz problem. */
/* [↓] concise & somewhat obtuse*/
do n=1 for 100
say right(word(word('Fizz',1+(n//3\==0))word('Buzz',1+(n//5\==0)) n,1),8)
end /*n*/
/*stick a fork in it, we're done.*/