Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int a,b,rev=0,rem,n;
- cin>>a;
- for(int i=1;i<=a;i++)
- {
- cin>>n;
- while(n!=0)
- {
- b=n;
- rem=n%10;
- rev=rev*10+rem;
- n=n/10;
- }
- if (rev == b)
- {
- cout<<"Case "<<i<<": Yes\n";
- }
- else
- {
- cout<<"Case "<<i<<": No\n";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement