#include <stdio.h>
double max(double,double);
double cube(double);
//main関数
int main(void) {
double a, b;
a = -3.2;
b = 1.4;
printf("max(|%f|,(%f)^3)=%f\n",a
,b
,max
(abs(a
),cube
(b
))); return 0;
}
//二つの引数の大きい方の値を返す関数
double max(double x, double y){
return (x>y)?x:y;
}
//引数の絶対値を返す関数
return (x>0)?x:-x;
}
//引数の三乗の値を返す関数
double cube(double x){
return x*x*x;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgpkb3VibGUgbWF4KGRvdWJsZSxkb3VibGUpOwpkb3VibGUgYWJzKGRvdWJsZSk7CmRvdWJsZSBjdWJlKGRvdWJsZSk7CgovL21haW7plqLmlbAKaW50IG1haW4odm9pZCkgewogICAgZG91YmxlIGEsIGI7CiAgICBhID0gLTMuMjsKICAgIGIgPSAxLjQ7CiAgICBwcmludGYoIm1heCh8JWZ8LCglZileMyk9JWZcbiIsYSxiLG1heChhYnMoYSksY3ViZShiKSkpOwkKCXJldHVybiAwOwp9CgovL+S6jOOBpOOBruW8leaVsOOBruWkp+OBjeOBhOaWueOBruWApOOCkui/lOOBmemWouaVsApkb3VibGUgbWF4KGRvdWJsZSB4LCBkb3VibGUgeSl7CiAgICByZXR1cm4gKHg+eSk/eDp5Owp9CgovL+W8leaVsOOBrue1tuWvvuWApOOCkui/lOOBmemWouaVsApkb3VibGUgYWJzKGRvdWJsZSB4KXsKICAgIHJldHVybiAoeD4wKT94Oi14Owp9CgovL+W8leaVsOOBruS4ieS5l+OBruWApOOCkui/lOOBmemWouaVsApkb3VibGUgY3ViZShkb3VibGUgeCl7CiAgICByZXR1cm4geCp4Kng7Cn0KCg==