1 #include <stdio.h>
2
3 int max(int x, int y){
4
5 return x>y?x:y;
6 }
7
8 int main(int argc, char *argv[]){
9 int a, b, c;
10
11 int (*p)(int ,int )=max;//不能省() 没有()结束指针函数了
12 scanf("%d %d", &a, &b);
13 c=(*p)(a,b);
14 printf("max %d\n", c);
15 if (a == c) {
16 printf("min=%d\n", b);
17 }else{
18 printf("min=%d\n", a);
19 }
20
21 return 0;
22 }
~
~
~
~
~
~