/* 看看这个 */ #include<stdio.h> #include<stdarg.h> int max_n(unsigned int n, ...); int main() { printf("%d", max_n(9, 1, 4, 7, 2, 5, 8, 3, 6, 9)); return 0; } int max_n(unsigned int n, ...) { int max = 0, tmp = 0; va_list args; va_start(args, n); while (n--) { max = max > (tmp = va_arg(args, int)) ? max : tmp; } va_end(args); return max; }