Skip to content

Instantly share code, notes, and snippets.

@ZASMan
Created October 13, 2015 02:18
Show Gist options
  • Save ZASMan/91eb6df4af8ec909b66d to your computer and use it in GitHub Desktop.
Save ZASMan/91eb6df4af8ec909b66d to your computer and use it in GitHub Desktop.
program4.rb
3.times do
puts "Hello!"
end
number = 0
#while (number <= 10) do # while this condition is true, do...
#p "the number is now #{number}" # whatever is in this code block
#number += 1 # short for number = number + 1
#end # don’t forget your end
(0..10).each do |n|
p "the new number is #{n}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment