Ruby/Range/max

Материал из Wiki.crossplatform.ru

Версия от 17:10, 26 мая 2010; (Обсуждение)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

The max Function gives the highest number in the range:

range1 = 1..100
puts range1.max
# The output of this code is 100.