Old lady swallowed a fly: Difference between revisions

add FreeBASIC
(→‎{{header|Python}}: Update to Python 3)
(add FreeBASIC)
Line 1,440:
 
base85> 3215 <compressed> uncompress >string print</lang>
 
=={{header|FreeBASIC}}==
<lang freebasic>dim as string lyrics(0 to 7, 0 to 1) = {_
{ "fly", "I don't know why she swallowed a fly - Perhaps she'll die!" },_
{ "spider", "That wriggled and jiggled and tickled inside her!" },_
{ "bird", "How absurd to swallow a bird!" },_
{ "cat", "Imagine that! She swallowed a cat!" },_
{ "dog", "What a hog, to swallow a dog!" },_
{ "goat", "She just opened her throat and swallowed a goat!" },_
{ "cow", "I don't know how she swallowed a cow."},_
{ "horse", "She's dead of course!" } }
for verse as ubyte = 0 to 7
for countdown as byte = verse to 0 step -1
if countdown = verse then
print "There was an old lady who swallowed a "; lyrics(verse, 0);"."
print lyrics(verse, 1)
if verse = 7 then end
end if
if countdown > 0 then print "She swallowed the ";lyrics(countdown, 0);_
" to catch the ";lyrics(countdown-1, 0);","
if countdown = 2 or countdown = 1 then print lyrics(countdown-1, 1)
next countdown
print
next verse</lang>
 
=={{header|Forth}}==
781

edits