Whats wrong in my approch

@neelrai906
1)change datatype of out[] from char to int.
2)after line 24 , you missed cin>>a;
3)line 9 should be out[i]=a[i]-‘0’; you used “==”
4)line 15 should be int digit=(n-i)-1;

@neelrai906
As I saw you got the 100 points. I am marking it as resolved.

1 Like

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.