main
parent
f1305e13cf
commit
529eb1448f
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,7 +4,7 @@ proc isPalindrome(s: string): bool =
|
||||||
return s == s.reversed()
|
return s == s.reversed()
|
||||||
|
|
||||||
|
|
||||||
let testString = "hallo" # Beispiel: Palindrom
|
let testString = "hallo" # Beispiel: Nicht Palindrom
|
||||||
if isPalindrome(testString):
|
if isPalindrome(testString):
|
||||||
echo testString, " ist ein Palindrom."
|
echo testString, " ist ein Palindrom."
|
||||||
else:
|
else:
|
||||||
|
@ -14,6 +14,11 @@ else:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# alternativ
|
# alternativ
|
||||||
proc reverseString(str: string): string =
|
proc reverseString(str: string): string =
|
||||||
var reversedStr = ""
|
var reversedStr = ""
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue