I couldn't find anything wrong with my code

why is it not giving me the desired output?

Hey @prateek_5
I did 2 minor corrections in your code & mentioned them in comments .
Here check this out :https://ide.codingblocks.com/s/319833
I hope your issue is resolved now.
Please mark this as resolved if your code works :slight_smile:

Damn! :slight_smile:

Thank you @Kartikkhariwal1