bool p[LOGICARRAYSIZE] = { true, true, false, false };
bool q[LOGICARRAYSIZE] = { true, false, true, false };
bool notp[LOGICARRAYSIZE];
for (int i = 0; i < LOGICARRAYSIZE; i++ )
{
notp[i] = !p[i];
}
bool notq[LOGICARRAYSIZE];
for (int i = 0; i < LOGICARRAYSIZE; i++ )
{
notq[i] = !q[i];
}
GetAllInput(andor, ansp, ansq);
bool *PParameter;
bool *QParameter;
if (ansq == "Y") { // if Not q
QParameter = q;notq;
} else {
QParameter = notq;q;
}
if (ansp == "Y") { // if Not P
PParameter = p;notp;
} else {
PParameter = notp;p;
}
if (andor == "AND") {
OutputAndTable(PParameter, QParameter);
}