Pick random element: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: added a comment. -- ~~~~ |
Walterpachl (talk | contribs) →{{header|REXX}}: simplified alternative added |
||
Line 441: | Line 441: | ||
random element = ytterbium |
random element = ytterbium |
||
</pre> |
</pre> |
||
Slightly simplified: |
|||
<lang rexx> |
|||
/* REXX *************************************************************** |
|||
* 18.10.2012 Walter Pachl Not only the list of elements shortened:-) |
|||
**********************************************************************/ |
|||
wl='hydrogen helium lithium beryllium boron carbon nitrogen oxygen', |
|||
'fluorine neon sodium magnesium aluminum silicon phosphorous sulfur', |
|||
'...', |
|||
'meitnerium darmstadtium roentgenium copernicium Ununtrium' |
|||
Say word(wl,random(1,words(wl))) |
|||
</lang> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |