On Sep 20, 10:15 pm, Icebeing <spamtro...@[EMAIL PROTECTED]
> wrote:
> Hi all,
>
> Some time ago, I got hit with this problem on a game-programming
> test, and it's bugged me ever since:
>
> The program has 2 inputs:
>
> 1 32-bit integer, called result
> 1 input string of digits
>
> The algorithm calls to construct an arithmetic expression string from
> the input string so that it evaluates to the result value, by
> inserting '+' and '*'
>
> example:
>
> input 1 = 44550
> input 2 = "8888225"
>
> algorithm spits out: "8888+22*5"
Maybe just a bad example. 8888+22*5 = 8998. Perhaps you meant
(8888+22)*5 but that seems to violate the rules.
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line. Sorry.


|