C语言初学 比较三个数中最大值的问题

#include<stdio.h>

#include<math.h>

main()

{

int x,y,n,m ,z;

      scanf("%d%d%d",&x,&y,&n);

z=max(x,y);

m=max(n,z);

printf("%d.\n",m);

}

     int max(int a,int b)

{

if(a>b) return a;

else return b; 

}

posted @ 2015-03-25 14:59  李京泽  阅读(600)  评论(0编辑  收藏  举报