tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
16
Task/Reverse-a-string/Turing/reverse-a-string.turing
Normal file
16
Task/Reverse-a-string/Turing/reverse-a-string.turing
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
% Reverse a string
|
||||
|
||||
var input : string (100)
|
||||
|
||||
put "Enter a string to reverse: " ..
|
||||
get input
|
||||
|
||||
var count : int := length(input)
|
||||
loop
|
||||
if count >= 1 then
|
||||
put input(count) ..
|
||||
else
|
||||
exit
|
||||
end if
|
||||
count := count - 1
|
||||
end loop
|
||||
Loading…
Add table
Add a link
Reference in a new issue