#include <bits/stdc++.h>
using namespace std;
int main() {
char a,b,r,p,s;
cin>>a>>b;
if(a==p and b==p){
cout<<p;
}else if(a==r and b==r){
cout<<r;
}else if(a==s and b==s){
cout<<s;
}else if(a==p and b==r){
cout<<s;
}else if(a==r and b==p){
cout<<s;
}else if(a==s and b==r){
cout<<p;
}else if(a==r and b==s){
cout<<p;
}else if(a==p and b==s){
cout<<r;
}else if(a==s and b==p){
cout<<r;
}
return 0;
}
Объяснение:
у меня там ошибка, не могу понять из за чего
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
using namespace std;
double area, circumference;
void circle(double);
int main() {
locale::global(locale(""));
cout << " Введите радиус: ";
double radius;
cin >> radius;
circle(radius);
streamsize accuracy = 8;
cout << " Длина окружности: " << setprecision(accuracy) << fixed << circumference << endl
<< " Площадь круга: " << area << endl;
cin.get(); cin.get();
return 0;
}
void circle(double _radius) {
circumference = 2 * M_PI * _radius;
area = M_PI * _radius * _radius;
}
Вроде бы так, если я тебе дай лучший ответ =) [с новым годом]
Код цифры d можно обозначить как r+d, где r - код для 0 (на самом деле r=48, это помнить необязательно). Тогда сумма кодов для "1999" равна 4r + (1 + 9 + 9 + 9) = 4r + 28; сумма кодов для "2011" равна 4r + (2 + 0 + 1 + 1) = 4r + 4. Сумма кодов для всех остальных строк больше 4r + 4, так как символы в этих строках стоят в кодовой таблице позже, чем в "2011"
ответ. "2011".