Hey i'm new in that community, so maybe that question was probably already asked before. Also before we get to the Problem, My Code is created to identify if a word is a palindrome or not. so here is the problem, my code works fine, but i would like to have to repeat this word-identify 5 times also like a loop in example.
#include <stdio.h>
int main()
{
char text[100];
int beg, mid, end, len = 0;
gets(text);
while (text[len] != '\0')
len++;
end = len - 1;
mid = len/2;
for (beg = 0; beg < mid; beg++)
{
if (text[beg] != text[end])
{
printf("This is not a palindrome.\n");
break;
}
end--;
}
if (beg == mid)
printf("This word is a Palindrome.\n");
return 0;
}