5. #include<iostream>
using namespace std;
int main() {
float a, b, s;
a = 5;
b = -3.5;
s = a + b;
s = 2 * s - b;
cout << s;
system("pause");
return 0;
}
6. #include<iostream>
float x = 5, y = -6,z;
if (x > y) {
z = x + y;
else {
z = y - x;
cout << z;
7. #include<iostream>
bool a = 1;
int b;
if (a) {
b = 4;
b = -4;
cout << b;
10. на картинке
5. #include<iostream>
using namespace std;
int main() {
float a, b, s;
a = 5;
b = -3.5;
s = a + b;
s = 2 * s - b;
cout << s;
system("pause");
return 0;
}
6. #include<iostream>
using namespace std;
int main() {
float x = 5, y = -6,z;
if (x > y) {
z = x + y;
}
else {
z = y - x;
}
cout << z;
system("pause");
return 0;
}
7. #include<iostream>
using namespace std;
int main() {
bool a = 1;
int b;
if (a) {
b = 4;
}
else {
b = -4;
}
cout << b;
system("pause");
return 0;
}
10. на картинке