RosettaCodeData/Task/Reverse-words-in-a-string/Run-BASIC/reverse-words-in-a-string.basic

23 lines
468 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
for i = 1 to 10
read string$
j = 1
r$ = ""
while word$(string$,j) <> ""
r$ = word$(string$,j) + " " + r$
j = j + 1
WEND
print r$
next
end
data "---------- Ice and Fire ------------"
data ""
data "fire, in end will world the say Some"
data "ice. in say Some"
data "desire of tasted I've what From"
data "fire. favor who those with hold I"
data ""
data "... elided paragraph last ..."
data ""
data "Frost Robert -----------------------"