Old lady swallowed a fly: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,915: | Line 1,915: | ||
ReadChar |
ReadChar |
||
END OldLady.</lang> |
END OldLady.</lang> |
||
=={{header|Nanoquery}}== |
|||
{{trans|Ursa}} |
|||
<lang nanoquery>reason = {"She swallowed the ", " to catch the "} |
|||
creatures = {"fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse"} |
|||
comments = {"I don't know why she swallowed that fly.\nPerhaps she'll die\n",\ |
|||
"That wiggled and jiggled and tickled inside her",\ |
|||
"How absurd, to swallow a bird",\ |
|||
"Imagine that. She swallowed a cat",\ |
|||
"What a hog to swallow a dog",\ |
|||
"She just opened her throat and swallowed that goat",\ |
|||
"I don't know how she swallowed that cow",\ |
|||
"She's dead of course"} |
|||
max = len(creatures) |
|||
for i in range(0, max - 1) |
|||
println "There was an old lady who swallowed a " + creatures[i] |
|||
println comments[i] |
|||
for (j = i) ((j > 0) && (i < (max - 1))) (j -= 1) |
|||
println reason[0] + creatures[j] + reason[1] + creatures[j - 1] |
|||
if j = 1 |
|||
println comments[j - 1] |
|||
end |
|||
end |
|||
end |
|||
input()</lang> |
|||
=={{header|Nim}}== |
=={{header|Nim}}== |