Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. # number = 0
  2. # while (number <= 10) do # while this condition is true, do...
  3. # p "the number is now #{number}" # whatever is in this code block
  4. # number += 1 # short for number = number + 1
  5. # end # don't forget your end
  6.  
  7. (0..10).each do |n|
  8. p "the new number is #{n}"
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement