# Thread: Finding the number of different paths on a rectangular grid

1. ## Finding the number of different paths on a rectangular grid

Attached is what my assignment is about that I'm kinda stuck on. The gist of the problem is I have to create a program that used a recursive function to find the number of different NE paths on a retangular grid. As in: There are 4 paths from (0,1) to (3,2)
(0,1) (0,2) (2,1) (2,2) (3,2)
(0,1) (1,1) (1,2) (2,2) (3,2)
(0,1) (1,1) (2,1) (2,2) (3,2)
(0,1) (1,1) (2,1) (3,1) (3,2)

I can understand what a recursive func. is but it's going about how to do the program. W/O the recursive part I could probably figure it out. :?

I'm kinda new at C++. Thanks in advance.

2. Here's the file.

3. Originally posted by joejoefla
Here's the file.
Originally posted by joejoefla
Here's the file.
Well the exit condition for the recursive function would be if the paths X axis exceeds the X axis of destination and same with Y... else just keep moving and increase the count...

Interesting.. will go home and code this...
but wont post the code for you to finish the home work ... may be i will.. but i charge by the character..

4. Hey thanks, I just been stuck in a runt for a while. You don't have to post the exact answer. I just need a kick in the right direction.