Anonymous user
Menu: Difference between revisions
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}}==
|