Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Mad-Libs/Ring/mad-libs.ring
Normal file
13
Task/Mad-Libs/Ring/mad-libs.ring
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
temp="<name> went for a walk in the park. <he or she> found a <noun>. <name> decided to take it home."
|
||||
k = substr(temp,"<")
|
||||
while k
|
||||
replace = substr(temp,k,substr(temp,">")-k + 1)
|
||||
see "replace:" + replace + " with: "
|
||||
give with
|
||||
while k
|
||||
temp = left(temp,k-1) + with + substr(temp,k + len(replace))
|
||||
k = substr(temp,replace)
|
||||
end
|
||||
k = substr(temp,"<")
|
||||
end
|
||||
see temp + nl
|
||||
Loading…
Add table
Add a link
Reference in a new issue