>>402
int max_n(const int *a, int n) {
int r = *a;
while(a++, --n)
r = (*a > r) ? *a : r;
return r;
}