mirror of
https://github.com/theoleuthardt/learningC.git
synced 2026-06-13 01:27:54 +00:00
15 lines
No EOL
316 B
C
15 lines
No EOL
316 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include "palindrom.h"
|
|
|
|
void palindrom(char array[]){
|
|
int l = 0;
|
|
int h = strlen(array) - 1;
|
|
|
|
while (h > l) {
|
|
if (array[l++] != array[h--]) {
|
|
printf("%s ist kein Palindrom\n", array);
|
|
}
|
|
}
|
|
printf("%s ist ein Palindrom\n", array);
|
|
} |