While loop


#1


Use a while loop to print out the numbers 1 through 50, inclusive. While the example above counts down, you will want to count up.

Use print rather than puts, and don't forget to increment your variable.


Oops, try again. It looks like you didn't print out the numbers 1 to 50, inclusive.


i=0
while i <51
 puts i
  i +=1
  
  end


#2

It looks like you didn't print out the numbers 1 to 50

you have to print from 1 to 50 not from 0 to 50


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.