From: Faith Tarcha Date: 2012-02-08T22:23:18+09:00 Subject: Re: Count the numbers in a loop Thanks, Peter for your answer :). I actually had the right code, just was putting it in the wrong places. Yes, sorry for the comments... I modified the code and did not change the comments at the same time. Yes, I'll definately give a more reasonable name to the function. This was a quick sketch. I have another question. The last one, I promise. Now I need to modify it into a range (of 2 numbers of course). So, for instance you type in 10 and 30 and it will pick up a number from that range between 10 and 30 with the highest count and display the highest count. For instance, it would display number 112... because that would be the highest count of a number in that range of 10 and 30. If anyone knows the answer, I will gladly give him/her a medal :) Faith -- Posted via http://www.ruby-forum.com/.