Re: array of integers
by Mike Fletcher other posts by this author
Oct 31 2006 6:12AM messages near this date
array of integers
|
Re: array of integers
Brad Tilley wrote:
> What is the best way to get determine the largest and smallest int in an
> array of ints? For example:
>
> x = [1,2,3,4]
>
puts x.max
puts x.min
See the documentation for Enumerable (try "ri Enumerable" at your
prompt).
--
Posted via http://www.ruby-forum.com/.
Thread:
Brad Tilley
Mike Fletcher
|