{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

testLogicals - <<"separated by a space Then press...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// filename: testLogicals.cpp // author: j. dzuback // date: 10/01/09 // modified by: /* ******************************************************** The program is a testbed for evaluating logical expressions for equivalency. Useful to test expressions for De Morgan's Law. ******************************************************** */ #include <iostream> #include <iomanip> # using namespace std; u int main() { int a = 0, b = 0, c = 0, d = 0; bool e = true, f = true; cout << endl << endl << "Enter integer values for a, b, c & d," << endl
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: << "separated by a space. Then press enter: "; cin >> a >> b >> c >> d; cout << endl << endl; // STUDENT -- fill in to test equivalent expression. Use an assignment operator to // set the true/false values in the bool identifiers e & f. // ie e = !(a == b); // f = (a != b); if (e == f) cout << "The expressions are equivalent!"; else cout << "The expressions are not equivalent!"; cout << endl << endl; cout << "***** end of testLogicals.cpp *****"; return 0; } // end of main...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern