In an MxN matrix, where each cell represents a coin, starting from the upper left position of the matrix and moving to the lower right position, collecting the coins that will be encountered, the following code presents the path which will provide the maximum number of coins and the number of collected coins. Movement from each position of the cell can be done by one square (one position) at a time and only downwards or to the right.
Functions: create( ): matrix creation display( ): matrix display process( ): finds the best path and counts coins results( ): results display