溢出问题
/* Note:Your choice is C IDE */#include "stdio.h"
void main()
{
float k,m,n,ko;
float max(int a,int b,int c);
k=max(1,2,3);
printf("%d\n",k);
m=max(4,2,3);
n=max(1,2,5);
ko=k/(m*n);
printf("%10f",ko);
}
float max(float a,float b,float c)
{
float max_num;
max_num=a;
if(b<c)
{
if(max_num<c)
max_num=c;
}
else
max_num=b;
return max_num;
}
望高手指点呃,这是我写的代码,怎么运行的时候结果怪怪的??小弟不胜感激啊~~~