#include <iostream>
using namespace std;
class circle {
public:
int x, y;
double r, s;
circle()
{
x = 0;
y = 0;
r = 0;
}
circle( int a = 0, int b = 0, double c = 0 )
{
set(a, b, c);
}
void out()
{
cout << "Координаты: (" << x << ", " << y << ") Радиус: "<< r << " Площадь: " << endl;
}
void set(int a, int b, double c)
{
x = a;
y = b;
r = c;
}
void calculate() {
s = r * r * 3.14159;
}
};
class sphere : public circle {
private:
double v;
void calculate() {
s = 4 * 3.14 * r * r;
v = 3.14159 * pow(r, 3);
}
public:
sphere();
sphere() : circle(circle, double = 1.0);
sphere (int = 0, int = 0, double = 1.0) ;
void out()
{
circle::out();
cout << ", радиус: " << r << ", длина: " << ", площадь: " << s;
}
};
int main(){
setlocale(LC_ALL, "ru");
circle a(2, 15, 4);
a.out();
sphere b;
system("pause");
return 0;
}
Объяснение: пойдёт?
a = float( input("Первое число:"))
b = float( input("Второе число:"))
c = float( input("Третье число:"))
if a < b < c :
print(str(a), ", ", str(b), ", ", str(c))
elif a > b > c :
print(str(c) + ", " + str(b) + ", " + str(a))
elif a > b < c :
print(str(b) + ", " + str(a) + ", " + str(c))
elif a < b > c :
print(str(c) + ", " + str(a) + ", " + str(b))
else:
print(str(a) + "= " + str(b) + "= " + str(c))
Объяснение: все проверил, все работает, и перед print(...) нужно поставить 4 пробела
Язык программирования: python 3