#include <stdio.h>
// max関数のプロトタイプ宣言
int max(int, int);
// main関数
int main(void) {
int a = 1, b = 5, c = 3, d = 4;
// max関数を入れ子にして4つの数の最大値を求める
int result = max(max(a, b), max(c, d));
printf("The maximum value is: %d\n", result
); return 0;
}
// max関数の定義
int max(int x, int y) {
return (x > y) ? x : y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovLyBtYXjplqLmlbDjga7jg5fjg63jg4jjgr/jgqTjg5flrqPoqIAKaW50IG1heChpbnQsIGludCk7CgovLyBtYWlu6Zai5pWwCmludCBtYWluKHZvaWQpIHsKICAgIGludCBhID0gMSwgYiA9IDUsIGMgPSAzLCBkID0gNDsKICAgIAogICAgLy8gbWF46Zai5pWw44KS5YWl44KM5a2Q44Gr44GX44GmNOOBpOOBruaVsOOBruacgOWkp+WApOOCkuaxguOCgeOCiwogICAgaW50IHJlc3VsdCA9IG1heChtYXgoYSwgYiksIG1heChjLCBkKSk7CiAgICAKICAgIHByaW50ZigiVGhlIG1heGltdW0gdmFsdWUgaXM6ICVkXG4iLCByZXN1bHQpOwogICAgcmV0dXJuIDA7Cn0KCi8vIG1heOmWouaVsOOBruWumue+qQppbnQgbWF4KGludCB4LCBpbnQgeSkgewogICAgcmV0dXJuICh4ID4geSkgPyB4IDogeTsKfQ==