Forgotten your password?

Forum Index > Ruby > Simple Loop Examples
Author Message
few examples of loops using ruby...

1
2
3
4.times do
  puts "Hello World!!!!!"
end


and another example, but this time using variables to print the numbers that are counted

1
2
3
4
5
count = 0
10.times do
  count += 1
  puts "hello world no. " + count.to_s
end



ok bored nm, will done more add more examples later lol
Excitting. Does it have anything to do with Rubik Cube? :pmsl:

BTW I wanted to write a program for resolving Rubik Cube in shortest way. Did anyone think of that?
it has nothing todo with rubik cube lol
ruby is on the move this days as i see
everywhere on net some ppl freakin for ruby :roll:
looks quite a complicated language to learn but i guess when you know a few languages they all probably look similar

I am learning c & java and i must say that theres not that many differences between the two of them , so im thinking that all languages are very similar in their own way , but will be a long time b4 i start learning languages like ruby :roll:


R€€SP€CT


jackel
Excitting. Does it have anything to do with Rubik Cube? :pmsl:

BTW I wanted to write a program for resolving Rubik Cube in shortest way. Did anyone think of that?


lol did u ever get round to doing this??? :pmsl:
Forum Index > Ruby > Simple Loop Examples