|
@ -2,24 +2,15 @@ |
|
|
#include<string.h> |
|
|
#include<string.h> |
|
|
#define N 40 |
|
|
#define N 40 |
|
|
void Umgebung(char str[N][N]); |
|
|
void Umgebung(char str[N][N]); |
|
|
void Palindrom(char str[N]); |
|
|
|
|
|
|
|
|
|
|
|
int main(){ |
|
|
int main(){ |
|
|
char str[N][N]; |
|
|
char str[N][N]; |
|
|
Umgebung(str); |
|
|
Umgebung(str); |
|
|
} |
|
|
} |
|
|
void Palindrom(char str[N]){ |
|
|
|
|
|
char str1[strlen(str)]; |
|
|
|
|
|
printf("bitte geben Sie Wort ein:\n"); |
|
|
|
|
|
scanf("%s",str); |
|
|
|
|
|
printf("\n"); |
|
|
|
|
|
strncpy(str1,str,strlen(str)); |
|
|
|
|
|
for(int i=0;i<strlen(str);i++){ |
|
|
|
|
|
str[i]=str1[strlen(str)-(i+1)]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
void Umgebung(char str[N][N]){ |
|
|
void Umgebung(char str[N][N]){ |
|
|
|
|
|
printf("\n"); |
|
|
|
|
|
printf("\tHerzlichen Willkommen zum Spiel \n"); |
|
|
|
|
|
printf("\n"); |
|
|
for (int i=0;i<=N;i++){ |
|
|
for (int i=0;i<=N;i++){ |
|
|
for(int j=0;j<=N;j++){ |
|
|
for(int j=0;j<=N;j++){ |
|
|
if((i==0)||(j==0)||(i==N)||(j==N)){ |
|
|
if((i==0)||(j==0)||(i==N)||(j==N)){ |
|
@ -30,6 +21,6 @@ void Umgebung(char str[N][N]){ |
|
|
} |
|
|
} |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
printf("\n"); |
|
|
|
|
|
|
|
|
} |
|
|
} |