C++ only Upvote for your own work and correct answer/ Downvote for copying the answer from a different website. It must be in C++ and it must be a working code. It needs to follow the required...


C++ only


Upvote for your own work and correct answer/ Downvote for copying the answer from a different website. It must be in C++ and it must be a working code. It needs to follow the required directions for example:
MAKE SURE IT POINTS OUT EVERY TIME THE STATEMENT IS INVALID IF IT IS INDEED INVALID.
 Thank You.


Assignment: Create a C++ program that can test the validity of propositional logic. Remember, a propositional logical statement is invalid should you find any combination of input where the PROPOSITIONAL statements are ALL true, while the CONCLUSION statement is false.


Propositional Statements:


If someone has a rocket, that implies they’re an astronaut.


If someone is an astronaut, that implies they’re highly trained.


If someone is highly trained, that implies they’re educated.


Conclusion Statement:


A person is educated, which implies they have a rocket.


Your output should declare the statement to either be valid or invalid. If it’s invalid, it needs to state which combination of inputs yielded the statement invalid. MAKE SURE IT POINTS OUT EVERY TIME THE STATEMENT IS INVALID IF IT IS INDEED INVALID.



HINT:
 You need all the possibilities for the four variables, Astronaut, Educated, Highly Trained, and Rocket. Then you're going to need to test the propositional statements. Those use the Implies operator (If this then that) A reminder that Implies can be expressed in C++ like this: !(A && !B) is equivalent to A implies B You'll also need to test the conclusion statement (that last implies, Educated implies Rocket) To actually tell if this is valid or not, you're looking for any combination of the four variables that results in the three propositions being true, while the conclusion is false.

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here