Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char main[1000],rev[1000];
- int freq=0;
- scanf("%[^\n]",main);
- int i,j;
- int len=strlen(main)-1;
- for(i=len,j=0;i>=0;i--,j++)
- {
- rev[j]=main[i];
- }
- for(i=0;i<len;i++)
- {
- if(rev[i]==main[i]){
- freq++;
- }
- }
- if(freq==len){
- printf("Yes\n");
- }
- else{
- printf("No\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement