sorry and thanks.
i don't quite understand the assistance vgersh99 provided me.
the code given what is it for ?
---------- Post updated at 08:01 PM ---------- Previous update was at 07:59 PM ----------
Quote:
Originally Posted by
ahamed101
Please provide the input and the expected output and some explanation.
We are all very happy to help everyone who comes here. But like the mod said, it is a voluntary service. And more over its a weekend!
--ahamed
lets say i read in a file...
it shows the available spaces remaining from a file
eg.
Quote:
AAAAAAAAAA
AAAAA A AA
2/20 spaces remaining
if the remaining spaces are less or equal to 9 the compiler will run & allocate without any issues (as above), but if i set remaining spaces to be more than 10 spaces out of the 20 spaces
eg.
Quote:
A AA A
A A A A A
11/20 spaces remaining
my compiler will simply hang and not do anything.
what i need to do is... eg i tell the compiler i need 4 spaces to be allocated to the remaining gaps - automatically.
the compliler will then start checking through and slot whichever gaps it could find with B and my result should return like this for instance:
and if i need 8 spaces to be filled it will be
and if 13 spaces needed to be filled
the codes which i tried to do as show on post #1 only could work for spaces not more than 9 remaining.
eg.
Quote:
AA A AA A
A A A A A
this runs fine
Quote:
A A AA A A
A A
this doesn't - as there are more than 10 spaces remaining