#include <iostream>#include <cmath>constexpr double semi_perimeter (double a, double b, double c) { return (a + b + c) / 2;}double first_task(double a, double b, double c) { auto p = semi_perimeter(a, b, c); return sqrt(p*(p-a)*(p-b)*(p-c));}int main() { double A, B, C, S; std::cin >> A >> B >> C; S = first_task(A, B, C); std:: cout << S << std::endl; return 0;}
Код2:
#include <iostream>#include <cmath>constexpr double peak(double a, double b) { return (a > b) ? a : b;}double second_task(double a, double b, double c) { return peak(peak(a, b), c);}int main() { double A, B, C, R; std::cin >> A >> B >> C; R = second_task(A, B, C); std:: cout << R << std::endl; return 0;}
Код1:
#include <iostream>#include <cmath>constexpr double semi_perimeter (double a, double b, double c) { return (a + b + c) / 2;}double first_task(double a, double b, double c) { auto p = semi_perimeter(a, b, c); return sqrt(p*(p-a)*(p-b)*(p-c));}int main() { double A, B, C, S; std::cin >> A >> B >> C; S = first_task(A, B, C); std:: cout << S << std::endl; return 0;}Код2:
#include <iostream>#include <cmath>constexpr double peak(double a, double b) { return (a > b) ? a : b;}double second_task(double a, double b, double c) { return peak(peak(a, b), c);}int main() { double A, B, C, R; std::cin >> A >> B >> C; R = second_task(A, B, C); std:: cout << R << std::endl; return 0;}Смотри вложения, там привел тебе решение.