Question: C++ discrete structure Simple 4-Statement Propositional Calculator Create a 4-statement propositional eakulator program. The program should display a mena with the following options Negation 2.
Simple 4-Statement Propositional Calculator Create a 4-statement propositional eakulator program. The program should display a mena with the following options Negation 2. Conjunction 3. Disjunction Implication 5. Equivalence 6. Store 7. Quit and then, prompt the user to select one of the chiooes. If the user sclects options 1 throgh 5, the program should prompt the user to enter the ecessary operand(s). The only valid operands shound be A, B, C, D, R, 0, 1, 2, 3 and 4. These operands represents CTTFFTTFFT T F FTT F DTFTFTFT FTFTFTF T F indicates the default value of the statement. If everything is valid, preform the selected operation with the selected operand(s), store the result in R and display R in row form enelosed in square braces; otherwise, display an error message. For example, if disjunction is selected along with the operands A and B, then R will be assigned and it will be displayed as above If the user selects option 6, the program should prompt the r to enter a memory location which is 2, 3 or 4. Ifone of those values is selected, store the current value of R in that statement letter, and then display it in row form enclosed in square braces; otherwise, display an eTor mese. Until option 7 is selected, contimae to display the m and proenpt the user to make a selection Your program mast o have a fanction for each operation (conjunction,disjunction, negation, implication, euialence). o represent each statement ketter with a boolean array o display trath values as T and F (case sensitive). Once you finish with your program, use the program to generate a truth table of that includes all intermediate wifts in order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
