Sha256: 10ed9ca1ce2e4613c618d34cc9f13d926d779be1f64de46e6895bf8fe7825c10
Contents?: true
Size: 330 Bytes
Versions: 1
Compression:
Stored size: 330 Bytes
Contents
plural = 's' 99.downto(1) do |i| puts "#{i} bottle#{plural} of beer on the wall," puts "#{i} bottle#{plural} of beer" puts "Take one down, pass it around!" plural = '' if i - 1 == 1 if i > 1 puts "#{i-1} bottle#{plural} of beer on the wall!" puts else puts "No more bottles of beer on the wall!" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mirah-0.0.8-java | examples/rosettacode/99-bottles-of-beer.mirah |