#include <stdio.h>
#include <ctype.h>
#include <string.h>
int isPalindrome( char *s);
int main (void)
{
int i=0;
int ch;
char s[100];
while (1){
while ((ch = getchar()) != ('\n')){
if (isalpha(ch)){
ch=toupper(ch);
s[i]=ch;
i++;
}
}
s[i]='\0';
if (isPalindrome(s) ==1){
printf("is palindrome\n");
}
else{
printf("not palindrome\n");
}
system("Pause");
return 0;
}
thanks,-------------------------------------------
Edited by v0id, 11 June 2008 - 05:13 AM.


Sign In
Create Account

Back to top









