Загрузка данных


#include <stdio.h>

int main() {
    double x, y, z, s, p;

    scanf("%lf %lf %lf", &x, &y, &z);

    if (x == y) {
        printf("x i y ravny\n");
        return 0;
    }

    s = (x + y + z) / 2;
    p = 2 * x * y * z;

    if (x <= y && y <= z) {
        x = s;
        z = p;
    }
    else if (x <= z && z <= y) {
        x = s;
        y = p;
    }
    else if (y <= x && x <= z) {
        y = s;
        z = p;
    }
    else if (y <= z && z <= x) {
        y = s;
        x = p;
    }
    else if (z <= x && x <= y) {
        z = s;
        y = p;
    }
    else {
        z = s;
        x = p;
    }

    printf("x = %.2lf\n", x);
    printf("y = %.2lf\n", y);
    printf("z = %.2lf\n", z);

    return 0;
}