Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Palindrome-detection/Ada/palindrome-detection-1.ada
Normal file
9
Task/Palindrome-detection/Ada/palindrome-detection-1.ada
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function Palindrome (Text : String) return Boolean is
|
||||
begin
|
||||
for Offset in 0..Text'Length / 2 - 1 loop
|
||||
if Text (Text'First + Offset) /= Text (Text'Last - Offset) then
|
||||
return False;
|
||||
end if;
|
||||
end loop;
|
||||
return True;
|
||||
end Palindrome;
|
||||
2
Task/Palindrome-detection/Ada/palindrome-detection-2.ada
Normal file
2
Task/Palindrome-detection/Ada/palindrome-detection-2.ada
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
function Palindrome (Text : String) return Boolean is
|
||||
(for all i in Text'Range => Text(i)= Text(Text'Last-i+Text'First));
|
||||
Loading…
Add table
Add a link
Reference in a new issue