why getting error, even I specified all return statements.
Check palindrome no
please share the correct link.
#include<iostream>
using namespace std;
int main()
{
int n,sum=0;
cin>>n;
while(n>0)
{
int last_digit=n%10;
sum=sum+last_digit;
sum*=10;
n/=10;
}
sum/=10;
cout<<sum;
}