classSolution { public: boolisPalindrome(intx) { inta=x; doubley=0; if(x<0){ returnfalse; } elseif(x%10!=0){ while(x!=0){ y=y*10+x%10; x=x/10; } } returny==a;} };
classSolution { public: boolisPalindrome(intx) { inta=x; doubley=0; if(x<0){ returnfalse; } elseif(x%10!=0){ while(x!=0){ y=y*10+x%10; x=x/10; } } returny==a;} };