#include <stdio.h>
double max(double x, double y);
double cube(double x);
int main(void) {
double a, b;
a = 3.0;
b = -2.0;
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;
}
CiNpbmNsdWRlIDxzdGRpby5oPgoKZG91YmxlIG1heChkb3VibGUgeCwgZG91YmxlIHkpOwpkb3VibGUgYWJzKGRvdWJsZSB4KTsKZG91YmxlIGN1YmUoZG91YmxlIHgpOwoKaW50IG1haW4odm9pZCkgewogICAgZG91YmxlIGEsIGI7CiAgICBhID0gMy4wOwogICAgYiA9IC0yLjA7CiAgICBwcmludGYoIm1heCh8JS5sZnwsKCUubGYpXjMpPSUubGZcbiIsIGEsIGIsIG1heChhYnMoYSksIGN1YmUoYikpKTsJCiAgICByZXR1cm4gMDsKfQoKZG91YmxlIG1heChkb3VibGUgeCwgZG91YmxlIHkpewogICAgcmV0dXJuICh4ID4geSkgPyB4IDogeTsKfQoKZG91YmxlIGFicyhkb3VibGUgeCl7CiAgICByZXR1cm4gKHggPiAwKSA/IHggOiAteDsKfQoKZG91YmxlIGN1YmUoZG91YmxlIHgpewogICAgcmV0dXJuIHggKiB4ICogeDsKfQo=