#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