Jump to content

The Name Game: Difference between revisions

no edit summary
No edit summary
Line 700:
Steve!
</pre>
=={{header|M2000 Interpreter}}==
<lang M2000 Interpreter>
Module The.Name.Game {
Flush
Data "Gary", "Earl","Billy","Felix"
Document doc$="The Name Game"
Report doc$
song$={
{0}, {0}, bo-{2}{1}
Banana-fana fo-{3}{1}
Fee-fi-mo-{4}{1}
{0}!
}
While not empty {
Read a$
x$=a$
b$=if$(x$ ~ "B*"->"", "b")
f$=if$(x$ ~ "F*"->"", "f")
m$=if$(x$ ~ "M*"->"", "m")
y$=if$(x$ ~ "[AEIOU]*"->lcase$(x$),Mid$(x$, 2))
toprint$=format$(song$, a$, y$, b$, f$, m$)
doc$=toprint$
report toprint$
}
Clipboard doc$
}
The.Name.Game
</lang>
 
{{out}}
<pre style="height:30ex;overflow:scroll">
The Name Game
Gary, Gary, bo-bary
Banana-fana fo-fary
Fee-fi-mo-mary
Gary!
 
Earl, Earl, bo-bearl
Banana-fana fo-fearl
Fee-fi-mo-mearl
Earl!
 
Billy, Billy, bo-illy
Banana-fana fo-filly
Fee-fi-mo-milly
Billy!
 
Felix, Felix, bo-belix
Banana-fana fo-elix
Fee-fi-mo-melix
Felix!
</pre >
 
 
=={{header|Modula-2}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.