#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;
}
Вроде бы так, если я тебе дай лучший ответ =) [с новым годом]
int main() { setlocale(LC_ALL, "");
int step = 0; double sum = 10,i = 10;
while (i < 20) { i += 0.8; sum += i; ++step; printf("\nstep is: %d\nsum is: %g",step,sum); } _getch(); return 0;}
/*Я не уверен что до конца разобрался что вам нужно ,но вроде это.Код написан на си/си++ (Вроде вам нужен на Паскале,но и тут не особо понял последний комментарий)*/