comment posted by Brian on 2004 Sep 23rd at 8:59, 0 comments

We agreed on two amendments. I'm suggest two more.

First i just want to remind people that this project should try to match the spirit of the conversation we had on IRC.

The language must be C. Really the language is not the focus here; the algorithm is.

Input may have parenthesis. All tokens will be separated by space. Integers (input) will have at most 5 digits. Output must be fully resolved, ie it must not be a fraction. Output must be base 10. The number of significant digits does not matter, as long as the answer is correct. Assume all operators are explicitly given. No exponents. Here's an example: (12 + (4 / 83) * 3) - 1. Assume there are no superfluous parentheses.

I suggest reading input from a file, one expression per line. This way we can have common test input and we can run n tests at a time without retyping them.

Bonus points (read bragging rights) to candidates who keep it simple.

## Language, Parentheses, Input, and KISS

We agreed on two amendments. I'm suggest two more.

First i just want to remind people that this project should try to match the spirit of the conversation we had on IRC.

The language must be C. Really the language is not the focus here; the algorithm is.

Input may have parenthesis. All tokens will be separated by space. Integers (input) will have at most 5 digits. Output must be fully resolved, ie it must not be a fraction. Output must be base 10. The number of significant digits does not matter, as long as the answer is correct. Assume all operators are explicitly given. No exponents. Here's an example: (12 + (4 / 83) * 3) - 1. Assume there are no superfluous parentheses.

I suggest reading input from a file, one expression per line. This way we can have common test input and we can run n tests at a time without retyping them.

Bonus points (read bragging rights) to candidates who keep it simple.

notify me: yes