以下程序运行输入45.6 39.2 得出的max为45.00000 还有的小数位数在哪儿去了?
#include<stdio.h>
int max(float x,float y);
main()
{
float a,b,c;
scanf("%f%f,",&a,&b);
printf("a=%f b=%f\n",a,b);
c=max(a,b);
printf("Max is %f\n",c);
}
int max(x,y)
float x,y;
{
float z;
z=x>y?x:y;
printf("z=%f\n",z);
return(z);
}