Rat chase maze (rightmost path) problem

here’s the link to my code- https://ide.codingblocks.com/s/224914
what’s the mistake?


fixed the error