Re: For loops trouble
- From: Josh Cheek <josh.cheek@xxxxxxxxx>
- Date: Sat, 16 Apr 2011 13:36:05 -0500
[Note: parts of this message were removed to make it a legal post.]
On Sat, Apr 16, 2011 at 1:27 PM, Daniel Johnson <zaldivar1841@xxxxxxxxx>wrote:
I am trying to translate a program I have in Java into ruby and havingnumbers = *1..10
trouble translating this for loop
for(int i = 0; a[i] < x;i++)
I tried this
for i in a[i]...x
but it produce some errors. Any help will be appreciated. Thank you.
--
Posted via http://www.ruby-forum.com/.
max = 6
numbers.each do |num|
break unless num < max
puts num
end
.
- Follow-Ups:
- Re: For loops trouble
- From: Josh Cheek
- Re: For loops trouble
- References:
- For loops trouble
- From: Daniel Johnson
- For loops trouble
- Prev by Date: For loops trouble
- Next by Date: Re: For loops trouble
- Previous by thread: For loops trouble
- Next by thread: Re: For loops trouble
- Index(es):
Relevant Pages
|