What is wrong with my code?

Custom input gives the output but test cases are not getting passed.

updated code now considers the case for 0 but still all but one cases show wrong answer. i’ll wait till ide is available https://ide.codingblocks.com/s/198384

the ide is unavailable at the moment I think, paste the code here if you can and i will have a look

Here https://ide.codingblocks.com/s/198794 the ide is working now


here you go
mistake, u do not need to break for x==0