#include <iostream>
using namespace std;
int main()
{
int a, b ,c ,x, y, z, t;
cin >> x >> y >> z >> t;
if ((x + y + z + t) / 3 == x)
{
cout << x-y <<" "<< x-z <<" "<< x-t;
}
if ((x + y + z + t) / 3 == y)
{
cout << y-x <<" "<< y-z << " "<<y-t;
}
if ((x + y + z + t) / 3 == z)
{
cout << z-y <<" "<< z-x <<" "<< z-t;
}
if ((x + y + z + t) / 3 == t)
{
cout << t-y <<" "<< t-z <<" "<< t-x;
}
return 0;
}
Объяснение:
Program n_1;
var x,y:double;
begin
read(x,y);
if x>y then x:=x+y
else x:=x*y;
writeln(x:0:5);
end.