Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main()
- {
- char s[50];
- cin>>s;
- int i,ok=1,n=strlen(s);
- for(i=0; i<n/2; i++) if(s[i]!=s[n-1-i]) ok=0;
- if(ok) cout<<"palindrom";
- else cout<<"nu este palindrom";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement