What is wrong in this code no test cases are passed

#include
using namespace std;
int main() {
int r,sum=0; n;
cout<<"enter a number "<<endl;
cin>>n;

while(n!=0)
{
   r=n%10;
   sum=sum*10 + r;
   n=n/10;
}

cout<<sum<<endl;
return 0;

}

don’t print this statment
because it is not mention in the question

your output must exactly match with given sample output

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.