Menu: Difference between revisions
Content added Content deleted
m (→{{header|UNIX Shell}}: fix a copypaste error (i suppose)) |
(Added R code) |
||
Line 196: | Line 196: | ||
Which is from the three pigs: 3 |
Which is from the three pigs: 3 |
||
You chose: tick tock</pre> |
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}}== |
=={{header|Ruby}}== |