1) #include <iostream>
using namespace std;
int main()
{
double a, b, c;
cin>>a;
cout<<endl;
cin>>b;
cin>>c;
cout << "Среднее: " << (a+b+c)/3 << endl;
cout << "Разность: " << 2 * (a + c) - 3 * b << endl;
}
2) #include <iostream>
int arr[4], max = 0;
for (int i = 0; i < 4; i++)
cin >> arr[i];
if(max < arr[i] && arr[i] % 2 == 0)
max = arr[i];
if (!max)
cout << "Not found";
else
cout << "Max: " <<max;
x1→(x2∧x3∨x4∧x5∨x6∧x7) при
x1 x2 x3 x4 x5 x6 x7 F
0 1 0 1 1 1 0 0
0→(1∧0∨1∧1∨1∧0) = 0→1 = 1, а F=0. Не подходит
2.
x2→(x1∧x3∨x4∧x5∨x6∧x7) при
x1 x2 x3 x4 x5 x6 x7 F
0 1 0 1 1 1 0 0
1→(0∧0∨1∧1∨1∧0) = 1→1 = 1, а F=0. Не подходит
3.
x3→(x1∧x2∨x4∧x5∨x6∧x7) при
x1 x2 x3 x4 x5 x6 x7 F
0 1 0 1 1 1 0 0
1→(0∧1∨1∧1∨1∧0) = 1→1 = 1, а F=0. Не подходит
4.
x4→(x1∧x2∨x3∧x5∨x6∧x7) при
x1 x2 x3 x4 x5 x6 x7 F
0 1 0 1 1 1 0 0
1→(0∧1∨0∧1∨1∧0) = 1→0 = 0 - верно
x1 x2 x3 x4 x5 x6 x7 F
1 0 1 1 0 0 1 0
1→(1∧0∨1∧0∨0∧1)=1→0 = 0 - верно
x1 x2 x3 x4 x5 x6 x7 F
0 1 0 1 1 0 1 0
1→(0∧1∨0∧1∨0∧1)=1→0 = 0 - верно
ответ: Выражение x4→(x1∧x2∨x3∧x5∨x6∧x7) соответствует F.
1) #include <iostream>
using namespace std;
int main()
{
double a, b, c;
cin>>a;
cout<<endl;
cin>>b;
cout<<endl;
cin>>c;
cout << "Среднее: " << (a+b+c)/3 << endl;
cout << "Разность: " << 2 * (a + c) - 3 * b << endl;
}
2) #include <iostream>
using namespace std;
int main()
{
int arr[4], max = 0;
for (int i = 0; i < 4; i++)
{
cin >> arr[i];
if(max < arr[i] && arr[i] % 2 == 0)
{
max = arr[i];
}
}
if (!max)
{
cout << "Not found";
}
else
{
cout << "Max: " <<max;
}
}