Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int i,j,l,c;
- string s;
- float n;
- cin>>s;
- j=s.length();
- l=j-1;
- n=ceil((s.length()/2.0));
- c=0;
- for(i=0; i<n; i++)
- {
- s[i]==s[l-i];
- cout<<s[i]<<" "<<s[l-i]<<endl;
- c++;
- cout<<c<<endl;
- }
- if(c==l)
- cout<<"mirror"<<endl;
- else
- cout<<"else"<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement