Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Program that can find a patern (http://www.programmingforums.org/showthread.php?t=2878)

Anyways Mar 21st, 2005 10:07 PM

Program that can find a patern
 
I have a list with a lot of numbers and I would liek to find the patern of those numbers do I can do a number generator with that patern (or aglorithm).

I made a program to put the number in orders, but cant think which code I need to use to find a patern.

The numbers are in TXT file, so can someone please post here a source code which can find that patern (tell me where I have to put the input file (file with the numbers).

Oh yea I forgot to tell you, the numbers are done with 13 character each (0 to 9) and they are separated with - after the 4 character and the 9 one.
example: 3245-42517-7522

Thank you.

tempest Mar 21st, 2005 11:37 PM

That would be a REALLY hard code to write. Nothing better than a human eye to look over the number set and give you a code to formulate them... I'm sure you can find somebody around that can do it, it's not that hard.

Berto Mar 22nd, 2005 2:27 AM

think abbout this

1 2 3 4 5 6 7 8 9 10 - + 1 to each
1 2 4 8 16 32 64 128 - double previous number
1 1 2 3 5 8 13 21 34 - add previous 2 numbers together

you could see the pattern due to being able to think abotu the problem, unless you define every single type of pattern to the program then have it chase them all, it would be practically impossible to work out the pattern :/


All times are GMT -5. The time now is 8:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC