Menu: Difference between revisions

213 bytes added ,  14 years ago
Added R code
m (→‎{{header|UNIX Shell}}: fix a copypaste error (i suppose))
(Added R code)
Line 196:
Which is from the three pigs: 3
You chose: tick tock</pre>
 
=={{header|R}}==
<lang R>
showmenu <- function()
{
choices <- c("fee fie", "huff and puff", "mirror mirror", "tick tock")
ans <- menu(choices)
if(ans==0) "" else choices[ans]
}
str <- showmenu()
</lang>
 
=={{header|Ruby}}==