Garbage output displayed

https://ide.codingblocks.com/s/103786 . the code seems to be working perfectly fine in the IDE but is always giving garbage value in the challenge section. this is not only happening with this question but each and every question of the challenge section which i fail to understand that why is it really happening. i kindly request you to look into the matter.

hi tanya
your code is giving correct answer for all the cases

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.