Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i,l,flag=1,j;
- char str[100];
- gets(str);
- l=strlen(str);
- for(i=0,j=l-1;i<l/2 ;i++,j--)
- {
- if(str[i]!=str[j])
- {flag=0;
- break ;}
- }
- if(flag==0)
- {
- printf("NOT Palindome ");}
- else{
- printf("Palindome");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement