Odpowiedź :
Odpowiedź:
Program 1:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
bool turn_on, move, day_light;
turn_on = false;
move = true;
day_light = false;
if (move == true && day_light == false)
{
turn_on = true;
cout<<turn_on;
}
else
{
turn_on = false;
}
return 0;
}
Program 2:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
bool turn_on, move, day_light;
turn_on = false;
move = false;
day_light = true;
if (move == false || day_light == true)
{
turn_on = false;
cout<<turn_on;
}
else
{
turn_on = true;
}
return 0;
}
Wyjaśnienie:
Mam nadzieję że pomogłem:)