1)
a = 1
b = 3*1 = 3
x = (1+3)/(1*3-1) = 4/(3-1) = 4/2 = 2
2)
#include <iostream>
using namespace std;
signed main() {
string name;
cin >> name;
cout << "Здравствуй, " << name << "! Давай дружить?";
}
3)
#include <iostream>
using namespace std;
signed main() {
int a,b,c;
cin >> a >> b >> c;
if(a == b || b == c || a == c)
cout << "YES";
else
cout << "NO";
}
4)
#include <iostream>
using namespace std;
signed main() {
int sum = 0;
while(true){
int x;
cin >> x;
if(x == 0)
break;
sum += x;
}
cout << sum;
}
Объяснение:
фото в студию, или в комменты