Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Reverse-a-string/CLU/reverse-a-string.clu
Normal file
12
Task/Reverse-a-string/CLU/reverse-a-string.clu
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
reverse = proc (s: string) returns (string)
|
||||
rslt: array[char] := array[char]$predict(1,string$size(s))
|
||||
for c: char in string$chars(s) do
|
||||
array[char]$addl(rslt,c)
|
||||
end
|
||||
return(string$ac2s(rslt))
|
||||
end reverse
|
||||
|
||||
start_up = proc ()
|
||||
po: stream := stream$primary_output()
|
||||
stream$putl(po, reverse("!dlrow ,olleH"))
|
||||
end start_up
|
||||
Loading…
Add table
Add a link
Reference in a new issue