Getting the wrong output can anyone let me know what’s the problem in my code
Problem Description
A matrix and a valid current position (row number and column number) are provided as input. Given a direction (RIGHT is 1, DOWN in 2, LEFT is 3 and UP is 4) and number of steps to move, output the values along the path taken to the new position, including the value at the new position.