标签:style io ar sp c on 代码 r size
代码:
#include <stdio.h> #include <stdlib.h> int max(int, int, int); int main(void) { int a, b, c; a = 100, b = 200, c = 300; printf("a = %d, b = %d, c = %d, max = %d\n", a, b, c, max(a, b, c)); a = 200, b = 300, c = 100; printf("a = %d, b = %d, c = %d, max = %d\n", a, b, c, max(a, b, c)); a = 300, b = 100, c = 200; printf("a = %d, b = %d, c = %d, max = %d\n", a, b, c, max(a, b, c)); return EXIT_SUCCESS; } int max(int a, int b, int c) { return a > b ? (a > c ? a : c) : (b > c ? b : c); }
标签:style io ar sp c on 代码 r size
原文地址:http://my.oschina.net/Xwoder/blog/324310