#include <stdio.h>
double max(double, double);
double abs2(double);
double cube(double);
//main関数
int main(void) {
double a, b;
a = 2.5;
b = -1.1;
printf("max(|%f|,(%f)^3)=%f\n",a
,b
,max
(abs2
(a
),cube
(b
))); return 0;
}
//二つの引数の大きい方の値を返す関数
double max(double x,double y){
return (x>y)?x:y;
}
//引数の絶対値を返す関数
double abs2(double x){
return (x>0)?x:-x;
}
//引数の三乗の値を返す関数
double cube(double x){
return x*x*x;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgpkb3VibGUgbWF4KGRvdWJsZSwgZG91YmxlKTsKZG91YmxlIGFiczIoZG91YmxlKTsKZG91YmxlIGN1YmUoZG91YmxlKTsKCi8vbWFpbumWouaVsAppbnQgbWFpbih2b2lkKSB7CiAgICBkb3VibGUgYSwgYjsKICAgIGEgPSAyLjU7CiAgICBiID0gLTEuMTsKICAgIHByaW50ZigibWF4KHwlZnwsKCVmKV4zKT0lZlxuIixhLGIsbWF4KGFiczIoYSksY3ViZShiKSkpOwkKCXJldHVybiAwOwp9CgkKLy/kuozjgaTjga7lvJXmlbDjga7lpKfjgY3jgYTmlrnjga7lgKTjgpLov5TjgZnplqLmlbAKZG91YmxlIG1heChkb3VibGUgeCxkb3VibGUgeSl7CiAgICByZXR1cm4gKHg+eSk/eDp5Owp9CgovL+W8leaVsOOBrue1tuWvvuWApOOCkui/lOOBmemWouaVsApkb3VibGUgYWJzMihkb3VibGUgeCl7CiAgICByZXR1cm4gKHg+MCk/eDoteDsKfQoKLy/lvJXmlbDjga7kuInkuZfjga7lgKTjgpLov5TjgZnplqLmlbAKZG91YmxlIGN1YmUoZG91YmxlIHgpewogICAgcmV0dXJuIHgqeCp4Owp9Cgo=