Advertisement
borsha06

mirror

Feb 27th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int i,j,l,c;
  6.     string s;
  7.     float n;
  8.     cin>>s;
  9.     j=s.length();
  10.     l=j-1;
  11.     n=ceil((s.length()/2.0));
  12.     c=0;
  13.     for(i=0; i<n; i++)
  14.     {
  15.         s[i]==s[l-i];
  16.         cout<<s[i]<<" "<<s[l-i]<<endl;
  17.         c++;
  18.         cout<<c<<endl;
  19.     }
  20.     if(c==l)
  21.         cout<<"mirror"<<endl;
  22.     else
  23.         cout<<"else"<<endl;
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement