Skip to content

Instantly share code, notes, and snippets.

@ruizjme
Last active March 13, 2017 23:18
Show Gist options
  • Save ruizjme/2ed60d9c47dd1d448f233ac09b07cef3 to your computer and use it in GitHub Desktop.
Save ruizjme/2ed60d9c47dd1d448f233ac09b07cef3 to your computer and use it in GitHub Desktop.
#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