Finding the number of different paths on a rectangular grid

This is a discussion on Finding the number of different paths on a rectangular grid within the C++ Programming forums, part of the General Programming Boards category; Attached is what my assignment is about that I'm kinda stuck on. The gist of the problem is I have ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    3

    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. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    3
    Here's the file.
    Attached Files Attached Files

  3. #3
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    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. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    3
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. recursive finding index of the min number in array??
    By kavka3 in forum C Programming
    Replies: 5
    Last Post: 01-18-2009, 07:14 AM
  2. Finding The Hcf Of A Number
    By Saimadhav in forum C++ Programming
    Replies: 5
    Last Post: 10-31-2008, 07:50 AM
  3. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 11:13 AM
  4. finding the largest number in a binary search
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 07-31-2008, 04:19 AM
  5. Array of boolean
    By DMaxJ in forum C++ Programming
    Replies: 11
    Last Post: 10-26-2001, 12:45 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21