编程题:用一组数组做函数参数来实现,输入两个数,输出其中最大数
#include<stdio.h>
float max(float x,float y)
{ float z;
if(x>y)z=x;
else z=y;
return z;
}
void main()
{
float a[2],c;
scanf("%f,%f",&a[0],&a[1]);
c=max(a[0],a[1]);
printf("%f,%f,the max is %f\n",a[0],a[1],c);
}