Can you tell whats wrong with my code?

hello @akash_281 i have made corrections in your code . it was a very small mistake .
plus i have suggested you one more method as well.

i have commented yuor mistake.
here is the link for the corrected code https://ide.codingblocks.com/s/320022.
I hope I have cleaed your Doubt .
Happy learning !!

1 Like

Yes, understood thankyou