1
0

c7-18.c 389 B

123456789101112131415161718
  1. #include <stdio.h>
  2. int main()
  3. { int max( );
  4. extern int A,B,C; // 把外部变量A,B,C的作用域扩展到从此处开始
  5. printf("Please enter three integer numbers:");
  6. scanf("%d %d %d",&A,&B,&C);
  7. printf("max is %d\n",max());
  8. return 0;
  9. }
  10. int A ,B ,C; // 定义外部变量A,B,C
  11. int max( )
  12. { int m;
  13. m=A>B?A:B;
  14. if (C>m) m=C;
  15. return(m);
  16. }