Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Palindrome-detection/Seed7/palindrome-detection-1.seed7
Normal file
14
Task/Palindrome-detection/Seed7/palindrome-detection-1.seed7
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const func boolean: palindrome (in string: stri) is func
|
||||
result
|
||||
var boolean: isPalindrome is TRUE;
|
||||
local
|
||||
var integer: index is 0;
|
||||
var integer: length is 0;
|
||||
begin
|
||||
length := length(stri);
|
||||
for index range 1 to length div 2 do
|
||||
if stri[index] <> stri[length - index + 1] then
|
||||
isPalindrome := FALSE;
|
||||
end if;
|
||||
end for;
|
||||
end func;
|
||||
|
|
@ -0,0 +1 @@
|
|||
palindrome(replace("in girum imus nocte et consumimur igni", " ", ""))
|
||||
Loading…
Add table
Add a link
Reference in a new issue