From: Ferdous ara Date: 2012-11-23T18:16:51+09:00 Subject: Re: how to increase variable inside the while loop Hi Thanks yes, i was thinking of using aRRAY array = Array.new array.push var1.to_i array.push var2.to_i array.push var3.to_i p array.sort.reverse puts (array[0]) puts (array[2]) but problem is , array[0] should get the value of after sorting, but it does not have a look [378329643008, 376666247168, 324617576448] 324617576448 378329643008 [396440922112, 338000334848, 337314353152] 338000334848 337314353152 if i can just compare first value 378329643008 and the last value 324617490432 and can get 60% difference , that will be fine . i know how to get 60% difference. but dont understand, , after shorting how to get the correct value. Thanks -- Posted via http://www.ruby-forum.com/.