Can't get to know which test case has been failed

#include
#include
using namespace std;
int main() {
int n;
cin>>n;

int count=0;
int a=n;
while (a>0)
{   
    if (a%10>0)
    {
        count++;
    }
    a=a/10;
}
        int reverse=0;

for(int i=count;i>0;i--)
{
    int m=n%10;
    int power= pow(10,i-1);
    int k=m*power;
    reverse=reverse+k;
    n=n/10;
}
cout<<reverse;
return 0;

}

This is the code. Plz help

@kalwani.aryan Hey Aryan Try “101” Input.:blush:

do you really require the first loop, think.

If not, then what are the changes you have to make in the rest of code.think

I would suggest you to make a dry run on your program by 101 n others to figure out the fault before changing it.

Hope, this would help.
If you still have doubts, feel free to ask

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.