Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;// ||
- int main () {
- int a,b,inv,i=0;
- cin>>a;
- b=a;
- while (b!=0)
- {
- inv=0;
- cin>>b;
- while (a!=0)
- {
- inv=inv*10+a%10;
- a/=10;
- }
- if (b==inv)
- i++;
- a=b;
- }
- cout<<i;
- return 0;
- }//*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement