Hello, me and my classmates are given a project in our subject discrete mathemat
ID: 3636822 • Letter: H
Question
Hello, me and my classmates are given a project in our subject discrete mathematics.. specifically in QUANTIFIERS that will be made into a C++ program.. all of us really have no idea how to make it in a program.. our professor said to convert statements into symbols (e.g. Ay Ex [ (x > 0) ? (x > 1) ] f(x) > y )... it would be a very big help if you could show us how to program it in C++.. please... please...please..
example:
input of user: Everyone has one good friend.
output: Ax Ex P(x)
please help us how to program it... THANK YOU SO MUCH! :))))
Explanation / Answer
Here's a program which I had written for First Order Logic, including quantifiers. I'm sure this will be of great help to you. #include #include #include #include using namespace std; //howmanytimes() Checks a char occurs how many times in a string //Used for paranthesis checking int howmanytimes (string a, char b) { int count = 0; for (int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.