From: sto.mar@... Date: 2012-11-23T15:13:07+09:00 Subject: Re: how to increase variable inside the while loop Am 22.11.2012 22:41, schrieb Joel Pearson: > if var1 > (var2 + var3)*0.6 > #do something > elsif var2 > (var1 + var3)*0.6 > #do something else > elsif var3 > (var2 + var1)*0.6 > #do something else again > end I'm not sure whether he wanted to compare with the sum of the other two values. @ Ferdous ara: If you want to sort some values, use an array and the method `sort' (surprise!): sorted_list = [4, 6, 2].sort # => [2, 4, 6] There are also methods to get the minimum or maximum of an array. --