c语言 变成求教

2024-12-21 10:38:54
推荐回答(1个)
回答1:

#include
float max(float a,float b);
main()
{
float x,y,z;
float max(float a,float b);
printf("input two numbers:\n");
scanf("%f%f",&x,&y);
z=max(x,y);
printf("maxmum=%f",z);
}
float max(float a,float b)
{
if(a>b)return a;else return b;
}