Pick random element: Difference between revisions
Content deleted Content added
→{{header|Pascal}}: add example |
Simpler D version |
||
Line 88:
=={{header|D}}==
<lang
void main() {
auto items = ["foo", "bar", "baz"];
auto r = items[uniform(0,
writeln(r);
}</lang>
|