Reverse words in a string: Difference between revisions
Content added Content deleted
(Added Wren) |
|||
Line 2,564: | Line 2,564: | ||
end for |
end for |
||
puts(1,join(lines,"\n"))</lang> |
puts(1,join(lines,"\n"))</lang> |
||
{{out}} |
|||
<pre> |
|||
------------ Fire and Ice ---------- |
|||
Some say the world will end in fire, |
|||
Some say in ice. |
|||
From what I've tasted of desire |
|||
I hold with those who favor fire. |
|||
... last paragraph elided ... |
|||
----------------------- Robert Frost |
|||
</pre> |
|||
=={{header|Phixmonti}}== |
|||
<lang Phixmonti>include ..\Utilitys.pmt |
|||
"---------- Ice and Fire ------------" |
|||
"" |
|||
"fire, in end will world the say Some" |
|||
"ice. in say Some" |
|||
"desire of tasted I've what From" |
|||
"fire. favor who those with hold I" |
|||
"" |
|||
"... elided paragraph last ..." |
|||
"" |
|||
"Frost Robert -----------------------" |
|||
stklen tolist |
|||
len for var i |
|||
i get split reverse i set |
|||
endfor |
|||
len for |
|||
get len dup if |
|||
for get print " " print endfor |
|||
else drop endif |
|||
drop nl |
|||
endfor</lang> |
|||
{{out}} |
{{out}} |
||
<pre> |
<pre> |