多个源程序合并成一个源程序

float maxtwo(float x,float y)
{
 float z;
 z=x>y?x:y;
 return z;
}
float maxthree(float x,float y, float z)
{
 float max;
 max=maxtwo(maxtwo(x,y),z);
 return max;
}
#include"file1.c"
#include"file2.c"
void main()
{
 float x,y,z,max;
 scanf("%f %f %f",&x,&y,&z);
 max=maxthree(x,y,z);
 printf("The max number is:%.0f",max);
}

比较两个数,三个数大小

发布了15 篇原创文章 · 获赞 3 · 访问量 373

猜你喜欢

转载自blog.csdn.net/Vevean2545116309/article/details/103311939