Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Reverse-a-string/Robotic/reverse-a-string.robotic
Normal file
16
Task/Reverse-a-string/Robotic/reverse-a-string.robotic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
. "local1 = Main string"
|
||||
. "local2 = Temporary string storage"
|
||||
. "local3 = String length"
|
||||
set "$local1" to ""
|
||||
set "$local2 " to ""
|
||||
set "local3" to 0
|
||||
|
||||
input string "String to reverse:"
|
||||
set "$local1" to "&INPUT&"
|
||||
set "$local2" to "$local1"
|
||||
set "local3" to "$local2.length"
|
||||
loop start
|
||||
set "$local1.(('local3' - 1) - 'loopcount')" to "$local2.('loopcount')"
|
||||
loop for "('local3' - 1)"
|
||||
* "Reversed string: &$local1& (Length: &$local1.length&)"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue