Jump to content

Pick random element: Difference between revisions

PascalABC.NET
(Added Uiua solution)
(PascalABC.NET)
 
Line 1,201:
writeln(s[low(s) + random(length(s))]);
end.</syntaxhighlight>
 
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
begin
var a := Arr('cat','dog','wolf','zebra');
a.RandomElement.Print
end.
</syntaxhighlight>
 
=={{header|Perl}}==
246

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.