1
0

c7-8-2.c 418 B

1234567891011121314151617181920
  1. #include <stdio.h>
  2. void main()
  3. { int max4(int a,int b,int c,int d);
  4. int a,b,c,d,max;
  5. printf("Please enter 4 interger numbers:");
  6. scanf("%d %d %d %d",&a,&b,&c,&d);
  7. max=max4(a,b,c,d);
  8. printf("max=%d \n",max);
  9. }
  10. int max4(int a,int b,int c,int d)
  11. {int max2(int a,int b);
  12. return max2(max2(max2(a,b),c),d); /* ×Ðϸ·ÖÎö´ËÐÐ */
  13. }
  14. int max2(int a,int b)
  15. {
  16. return(a>b?a:b);
  17. }