Haha, we're going in circles :)
I'll add a third option to the example to make the combinations explicit.
./program --add 3 --mul --sub 1
> 17
20 /* add */
51 /* mul */
Type: Posts; User: stickmangumby
Haha, we're going in circles :)
I'll add a third option to the example to make the combinations explicit.
./program --add 3 --mul --sub 1
> 17
20 /* add */
51 /* mul */
The operations above were simply for illustrative purpose.
I think what you've missed is the fact that the program computes the results of all operations, and all combinations of operations, on...
The only problem in your code MacGyver is that the program also needs to handle combinations of inputs.
list = {add, multiply, add & multiply}
Although, storing the result of 'add' for...
Too slow :P
^^
I'm not quite sure what you mean. Most of the variables have two cases, 0 or 1, to indicate FALSE (not given as an option) and TRUE (given as an option) respectively.
If A is true, and B is true,...
Thanks for the encouragement MacGyver :)
I'm afraid of something horrible like this:
/* Not actual code! */
int process_input(options)
switch (add)
Haha, I forgot to mention several of the options are strings.
The majority of the options are true/false, and they can all be true. They will be used to operate on the input separately, then in...
I'm in my second year at uni, doing a Computer Science degree, and am now starting to write non-trivial programs. I'm learning lots of intermediate level stuff, but one thing I'm stumped on is...