tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
17
Task/Reverse-a-string/Seed7/reverse-a-string.seed7
Normal file
17
Task/Reverse-a-string/Seed7/reverse-a-string.seed7
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
$ include "seed7_05.s7i";
|
||||
|
||||
const func string: reverse (in string: stri) is func
|
||||
result
|
||||
var string: result is "";
|
||||
local
|
||||
var integer: index is 0;
|
||||
begin
|
||||
for index range length(stri) downto 1 do
|
||||
result &:= stri[index];
|
||||
end for;
|
||||
end func;
|
||||
|
||||
const proc: main is func
|
||||
begin
|
||||
writeln(reverse("Was it a cat I saw"));
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue