#include <stdio.h>
double max(double x, double y);
double cube(double x);
int main(void) {
double a, b;
a = -3.2;
b = 1.4;
printf("max(|%.2f|, (%.2f)^3) = %.2f\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+Cgpkb3VibGUgbWF4KGRvdWJsZSB4LCBkb3VibGUgeSk7CmRvdWJsZSBhYnMoZG91YmxlIHgpOwpkb3VibGUgY3ViZShkb3VibGUgeCk7CgppbnQgbWFpbih2b2lkKSB7CiAgICBkb3VibGUgYSwgYjsKICAgIGEgPSAtMy4yOwogICAgYiA9IDEuNDsKICAgIHByaW50ZigibWF4KHwlLjJmfCwgKCUuMmYpXjMpID0gJS4yZlxuIiwgYSwgYiwgbWF4KGFicyhhKSwgY3ViZShiKSkpOwkKICAgIHJldHVybiAwOwp9Cgpkb3VibGUgbWF4KGRvdWJsZSB4LCBkb3VibGUgeSkgewogICAgcmV0dXJuICh4ID4geSkgPyB4IDogeTsKfQoKZG91YmxlIGFicyhkb3VibGUgeCkgewogICAgcmV0dXJuICh4ID4gMCkgPyB4IDogLXg7Cn0KCmRvdWJsZSBjdWJlKGRvdWJsZSB4KSB7CiAgICByZXR1cm4geCAqIHggKiB4Owp9Cg==