1. Programming Challenge

Nine 9s

Combining nine 9s with any number of the operators +, -, *, /, (, ) ,
what is the smallest positive integer that cannot be expressed? * * *
Hints:

* * * 1)The answer isn't zero. You can express zero like this:
* * * * * * (9 - 9) * (9 + 9 + 9 + 9 + 9 + 9 + 9)
* * Also, zero isn't a positive integer.

* * * 2) The answer isn't one. You can express one like this:
* * * * * * *9 - (9 * 9 - 9)/9 + 9 - 9 + 9 - 9

* * * 3) It's not a trick question.

* * * 4) Be sure to handle parentheses correctly.

Notes:

* * * You cannot exponentiate.
* * * You cannot concatenate (for example, put two 9s together to make
99).
* * * The - operator can be used in either its binary or unary form.
* * * Assume base 10.

--EDIT--

The correct text, this time.

2. Re: Programming Challenge

can I flip the 9 so that it looks like a 6?

3. Re: Programming Challenge

can I flip the 9 so that it looks like a 6?
Nope, sorry I can't allow that

4. Re: Programming Challenge

bc session:
Code:
```((9*(9+9))/(9*9))+9-9+9-9
2.00```

5. Re: Programming Challenge

And I'm glad you're not heart broken anymore (juding from your avatar at least)

6. Re: Programming Challenge

bc session:
Code:
```((9*(9+9))/(9*9))+9-9+9-9
2.00```
Nope... the smallest positive integer which CANNOT be expressed.. 2 can be expressed.

GnuVince, you will probably have to do some coding in order to solve this... and don't expect me to have the answer, I'm trying to solve it as well.... along with several engineering students.

7. Re: Programming Challenge

I just wanted to show that 2 could be expressed.

8. Re: Programming Challenge

And I'm glad you're not heart broken anymore (juding from your avatar at least)
Nope sorry, still hung on her...

9. Re: Programming Challenge

What do you mean by &quot;cannot be expressed&quot;?

10. Re: Programming Challenge

What do you mean by &quot;cannot be expressed&quot;?
We are looking for the smallest positive integer which we cannot make using the above...

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•