From: sto.mar@... Date: 2013-04-12T05:19:45+09:00 Subject: Re: confusion with gets, if Am 11.04.2013 19:16, schrieb sto.mar@web.de: > I'm not exactly sure what you are trying to do, but I don't care > much for the while loop and all the counters. I got all the answers to your original questions just now, including your complete example. A different implementation: counts = [0, 0, 0] total = 0 while total < 5 do answer = gets.chomp case answer when '10' counts[0] += 1 when '20' counts[1] += 1 when '30' counts[2] += 1 else puts "Try again" end total = counts.inject(:+) end puts counts --