|
Another request for help
|
|
11-11-2009, 06:46 AM
Post: #11
|
|||
|
|||
|
RE: Another request for help
Okay i just changed a few lines so you just have to pass to the function number in array and it will calculate x(that_number).
Here is the whole code, i tested it wand it works. Code: program array_test;There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
11-11-2009, 07:34 AM
(This post was last modified: 11-11-2009 06:04 PM by Dwel.)
Post: #12
|
|||
|
|||
|
RE: Another request for help
I only have it on paper. I need to test it first. I will post it as soon as I get the whole program done.
Hmm, your generation code kinda breaks when it reaches ~23 values. It goes - . . . . 8 2 2 4 4 4 4 10 2 2 5 1 1 1 1 1 1 1 (the ones here kinda go on until they start with 5's again and then it gets weirder). Actually it skips 9 here and goes to 10 where it breaks at the 5's. This is the part of the code that fills the n columns and n rows matrix in a spiral manner by calling the next value at each step. Sadly, I still haven't succeded in getting the generation implemented. Code: var i,j,c:integer;This is just the processing. I see I haven't inlcuded the actual printing. |
|||
|
11-11-2009, 06:32 PM
(This post was last modified: 11-11-2009 06:33 PM by Dwel.)
Post: #13
|
|||
|
|||
|
RE: Another request for help
This is the whole problem as I have it. Fill a n*n matrix in a spiral manner using the values of that X (4 2 2 6 2 2 3 3 3...).
Of course, it doesn't really work for anything else than the value 1 (where it just displays 4). I used your last generation code (which is still broken after it passes the 8 sequence - 8 2 2 4 4 4 4 -> 10 / It skips the 9 and then becomes weird). And I've added the spiral filling I thought should work...but it doesn't for some reason. Code: Program PopulateMatrix; |
|||
|
11-12-2009, 03:33 AM
Post: #14
|
|||
|
|||
|
RE: Another request for help
I think i know where is the mistake . . .
But the problem is that your matrix spiral filling doesn't work for me it enters in dead loop. There tasks are not heavy, the problem is time . . . I have to think about that again ! There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
11-12-2009, 03:45 AM
Post: #15
|
|||
|
|||
|
RE: Another request for help
Okay i have found a mistake in generation, try now.
There is a possibility to have that sequence of ones, but very far, i can make it better, but it is good like this. Test it on 40, 50, 100 it will be okay. Code: program array_test;There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
11-12-2009, 03:50 PM
Post: #16
|
|||
|
|||
|
RE: Another request for help
The new version that should fix the spiral filling. But it still has a few bugs. With the new generation added.
Code: Program PopulateMatrix; |
|||
|
« Next Oldest | Next Newest »
|





