Объяснение:
<---------------------------1--------------------------->
#include <iostream>
using namespace std;
int main() {
int a;
cin>>a;
if ((a/100+(a%100)/10+a%10) % 2 == 0)
cout << "YES";
else
cout << "NO";
return 0;
}
<---------------------------2--------------------------->
int a, b, c;
cin >> a >> b >> c;
if (a == b || a == c || c == b)
<---------------------------3--------------------------->
int main()
{
int a, b;
char sing;
cin >> a >> sing >> b;
switch (sing)
case '*':
cout << a * b;
break;
case '/':
cout << a / b;
case '+':
cout << a + b;
case '-':
cout << a - b;
default:
cout << "ERROR";
using namespace std;
int main(){
int month;
cout << "Введите число: " << endl;
cin >> month;
switch(month){
case 1:
cout << "Январь." << endl;
break;
case 2:
cout << "Февраль." << endl;
break;
case 3:
cout << "Март." << endl;
break;
case 4:
cout << "Апрель." << endl;
break;
case 5:
cout << "Май." << endl;
break;
case 6:
cout << "Июнь." << endl;
break;
case 7:
cout << "Июль." << endl;
break;
case 8:
cout << "Август." << endl;
break;
case 9:
cout << "Сентябрь." << endl;
break;
case 10:
cout << "Октябрь." << endl;
break;
case 11:
cout << "Ноябрь." << endl;
break;
case 12:
cout << "Декабрь." << endl;
break;
default: cout << "Некорректный ввод." << endl;
}
}
Объяснение:
<---------------------------1--------------------------->
#include <iostream>
using namespace std;
int main() {
int a;
cin>>a;
if ((a/100+(a%100)/10+a%10) % 2 == 0)
cout << "YES";
else
cout << "NO";
return 0;
}
<---------------------------2--------------------------->
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == b || a == c || c == b)
cout << "YES";
else
cout << "NO";
return 0;
}
<---------------------------3--------------------------->
#include <iostream>
using namespace std;
int main()
{
int a, b;
char sing;
cin >> a >> sing >> b;
switch (sing)
{
case '*':
cout << a * b;
break;
case '/':
cout << a / b;
break;
case '+':
cout << a + b;
break;
case '-':
cout << a - b;
break;
default:
cout << "ERROR";
break;
}
return 0;
}