#include
using namespace std;
bool implication(bool x, bool y) {
return (!x) || y;
}
bool experssion(bool x, bool y, bool z, bool w) {
return implication(implication(y, z), (x && y)) && implication(x, w);
}
int main()
{
for (int x = 0; x < 2; ++x) {
for (int y = 0; y < 2; ++y) {
for (int z = 0; z < 2; ++z) {
for (int w = 0; w < 2; ++w) {
if (experssion(x, y, z, w)) {
cout << "x: " << x << ", y: " << y << ", z: " << z << ", w: " << w << endl;
}
}
}
}
}
return 0;
}
#include <iostream>
using namespace std;
int main()
{
cout << "x\ty\tz\tw\t\n";
for (int x = 0; x < 2; x++)
{
for (int y = 0; y < 2; y++)
{
for (int z = 0; z < 2; z++)
{
for (int w = 0; w < 2; w++)
{
if ( ( ! (!( y || z) || ( x & y ) ) & !( x || w) ) == 1)
{
cout << x << "\t" << y << "\t" << z << "\t" << w << "\t" << endl;
}
}
}
}
}
return 0;
}
Помогите , пожалуйста. Что не правильно сделал