99 bottles of beer: Difference between revisions
Content deleted Content added
Line 2,524: | Line 2,524: | ||
(if i == 1 then " bottle" else " bottles") + " of beer\nTake one down, pass it around\n" + (i - 1) as string + (if i - 1 == 1 then "\ |
(if i == 1 then " bottle" else " bottles") + " of beer\nTake one down, pass it around\n" + (i - 1) as string + (if i - 1 == 1 then "\ |
||
bottle" else " bottles") + " of beer on the wall\n" + (if i - 1 == 0 then "\nno more beer" else "")))</lang> |
bottle" else " bottles") + " of beer on the wall\n" + (if i - 1 == 0 then "\nno more beer" else "")))</lang> |
||
=={{header|Mirah}}== |
|||
<lang Mirah>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 |
|||
</lang> |
|||
=={{header|ML/I}}== |
=={{header|ML/I}}== |