Mega Code Archive

 
Categories / Ruby / Range
 

The max Function gives the highest number in the range

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