How to remove leading zeroes

https://ide.codingblocks.com/s/152185 two test cases going wrong bcoz of leading zeroes. How scan I remove leading zeroes

Hi @tanjuljain19,
In your code because you are reversing the number twice it losses both the front as well as last zeroes … for example for 999 you will convert to 0. So i would suggest to use string to store the numbers and do the maniipulation on them as then you will not loss any character … And also for the test case 999 you must have 900 as answer … the first character will not become 0 if earlier it is 9.

if you have more 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.