Oct-01-2020, 09:46 AM
For those interested, all odd numbers are OK:
No recursion. Number = 9
Paul
No recursion. Number = 9
Paul
Output:[1, 2, 3, 4, 5, 6, 7, 8, 9]
[32, 33, 34, 35, 36, 37, 38, 39, 10]
[31, 56, 57, 58, 59, 60, 61, 40, 11]
[30, 55, 72, 73, 74, 75, 62, 41, 12]
[29, 54, 71, 80, 81, 76, 63, 42, 13]
[28, 53, 70, 79, 78, 77, 64, 43, 14]
[27, 52, 69, 68, 67, 66, 65, 44, 15]
[26, 51, 50, 49, 48, 47, 46, 45, 16]
[25, 24, 23, 22, 21, 20, 19, 18, 17]
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.