Author |
Message |
baby girl
|
Posted: Tue Dec 10, 2002 9:33 am Post subject: aother one |
|
|
write a program witch asks the user to enter a word and it outputs the word reverse.
one example is time : emit |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Tue Dec 10, 2002 12:13 pm Post subject: (No subject) |
|
|
same as before, its about selecting a part of the string... In reverse order that is:
for decreasing i:length(text)..1
put text(i)..
end for
runs loop from last letter to first, outputing 1 letter at a time. Don't forget .. to have word appear on same line. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
baby girl
|
Posted: Fri Dec 13, 2002 10:47 am Post subject: (No subject) |
|
|
for decreasing i:length(text)..1
put text(i).. i dont get that
?? i do it and it has a error
can you make the word "baby" reverse for me? |
|
|
|
|
 |
Tony

|
Posted: Fri Dec 13, 2002 2:44 pm Post subject: (No subject) |
|
|
what kind of error are you getting? maybe you forgot to declear the variable?
code: |
var text:string := "tony"
for decreasing i:length(text)..1
put text(i)..
end for
|
output will be "ynot" |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
|