Truth table: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
A [[wp:Truth table|truth table]] is a display of the inputs to, and the output of a Boolean |
A [[wp:Truth table|truth table]] is a display of the inputs to, and the output of a Boolean function organized as a table where each row gives one combination of input values and the corresponding value of the function. |
||
;Task: |
;Task: |
||
# Input a Boolean |
# Input a Boolean function from the user as a string then calculate and print a formatted truth table for the given function.<br> (One can assume that the user input is correct). |
||
# Print and show output for Boolean |
# Print and show output for Boolean functions of two and three input variables, but any program should not be limited to that many variables in the function. |
||
# Either reverse-polish or infix notation expressions are allowed. |
# Either reverse-polish or infix notation expressions are allowed. |
||