Last active
March 13, 2017 23:18
-
-
Save ruizjme/2ed60d9c47dd1d448f233ac09b07cef3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void printTruthTable () { | |
cout << "A B | X" << endl; | |
for (int i = 0; i <= 1; i++){ | |
for (int j = 0; j <= 1; j++){ | |
bool A = i; | |
bool B = j; | |
cout << i << " " << j << " | " << !( !(A && !B) && !(!A && B) ) << endl; //change function to be evaluated here | |
} | |
} | |
} | |
int main () { | |
printTruthTable(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment