Skip to content

Instantly share code, notes, and snippets.

View hannahbasil's full-sized avatar

Hannah Basil hannahbasil

  • Charlie App
  • Chicago, IL
View GitHub Profile
@hannahbasil
hannahbasil / 99_bottles_of_beer.rb
Last active August 29, 2015 14:13
99 bottles of beer
while number.to_i >=1
puts "What's the first number in the 99 bottles of beer on the wall song?"
number= gets.chomp
puts number + " bottles of beer on the wall," + number +" bottles of beer."
puts "Take one down and pass it around,"+((number.to_i)-1).to_s+ " bottles of beer on the wall."
if number.to_i == 1
break
puts "1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, no more bottles of beer on the wall.
No more bottles of beer on the wall, no more bottles of beer.