Truth Table generator

I was wondering if I could have some help on this topic.
If a user enters a string of boolean algebra it will ouput the table.

I have input parsing, cycling through the combinations, and outputing working.
However once i parse the input I am not sure what to do with it. I have thought of having it write the parsed input to a new file as a function and then use that function, but that seems bad.

If anyone has any ideas on how to dynamically create the function, I don't need any code, just some ideas on how to implement it.

BTW This is a console function, if that changes anything.

Thanks for any help given!
You have input parsing.
You have cycling through combinations.
You're not sure what to do with the parsed input?

Hint: Try cycling through the combinations of the parsed input.

Bonus Hint: Don't even think of using files.

Secret Hint: You don't need to dynamically create the function, the function needs to be able to work with dynamic input.
Last edited on
Thanks, I figured out the problem. I was trying to evaluate the all the parts at once instead of piece by piece. What i wad trying to do was make it be a complete phrase like: !a || b, instead of first !a and then or that out put with b. XD
Topic archived. No new replies allowed.