Thread: Recursive Functions

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    6

    Recursive Functions

    I need some help with an assignment.
    I've got most of it figured out, I just need to code a part where it tries every possible combination of numbers to see if it fits a certain pattern.
    it needs to be able to handle any number of digits and to any depth.
    e.g it would have to be able to handle trying all combinations of 1 to 4 for 6 digits.
    I have thought about this problem alot and the only way I can think of solving it is by recursive functions. If anybody has had to solve a siimilar problem or can be of any help can you plesase post.

    thanks

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    You can find all combinations with a recursive or a non-recursive solution. Do a google search, you'll get plenty of hits with explanations, source code and libraries.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loops or recursive functions?
    By mariano_donati in forum C Programming
    Replies: 5
    Last Post: 05-12-2008, 12:41 PM
  2. recursive function
    By technosavvy in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 05:42 AM
  3. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. How to change recursive loop to non recursive loop
    By ooosawaddee3 in forum C Programming
    Replies: 1
    Last Post: 06-24-2002, 08:15 AM