Ответы
Ответ дал:
0
Задача 2.1
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int input;
cin >> input;
int size1 = abs(input / 100 - input % 100 / 10);
int size2 = abs(input % 100 / 10 - input % 10);
if (size1 == size2){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
}
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int input;
cin >> input;
int size1 = abs(input / 100 - input % 100 / 10);
int size2 = abs(input % 100 / 10 - input % 10);
if (size1 == size2){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
}
Похожие вопросы
2 года назад
2 года назад
2 года назад
2 года назад
8 лет назад
9 лет назад
9 лет назад