#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(|%lf|,(%lf)^3)=%lf\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+Cgpkb3VibGUgbWF4KGRvdWJsZSxkb3VibGUpOwpkb3VibGUgYWJzKGRvdWJsZSk7CmRvdWJsZSBjdWJlKGRvdWJsZSk7Ci8vbWFpbumWouaVsAppbnQgbWFpbih2b2lkKSB7CiAgICBkb3VibGUgYSwgYjsKICAgIGEgPSAtMy4yOwogICAgYiA9IDEuNDsKICAgIHByaW50ZigibWF4KHwlbGZ8LCglbGYpXjMpPSVsZlxuIixhLGIsbWF4KGFicyhhKSxjdWJlKGIpKSk7CQogICAgCXJldHVybiAwOwp9Ci8v5LqM44Gk44Gu5byV5pWw44Gu5aSn44GN44GE5pa544Gu5YCk44KS6L+U44GZ6Zai5pWwCmRvdWJsZSBtYXgoZG91YmxlIHgsIGRvdWJsZSB5KXsKICAgIHJldHVybiAoeD55KT94Onk7Cn0KCi8v5byV5pWw44Gu57W25a++5YCk44KS6L+U44GZ6Zai5pWwCmRvdWJsZSBhYnMoZG91YmxlIHgpewogICAgcmV0dXJuICh4PjApP3g6LXg7Cn0KCi8v5byV5pWw44Gu5LiJ5LmX44Gu5YCk44KS6L+U44GZ6Zai5pWwCmRvdWJsZSBjdWJlKGRvdWJsZSB4KXsKICAgIHJldHVybiB4KngqeDsKfQoKCgoK