解题思路:
注意事项:
参考代码:
#include <stdio.h>
#include <string.h>
#include <math.h>
#define MAXNUM(x,y,z) MAX=x>y?x:y;MAX=MAX>z?MAX:z
void Myfunction(float x, float y, float z);
int main()
{
float x, y, z,MAX;
scanf("%f %f %f", &x, &y, &z);
Myfunction(x, y, z);
MAXNUM(x, y, z);
printf("%.3f\n", MAX);
return 0;
}
void Myfunction(float x, float y, float z)
{
float MAX;
MAX = x > y ? x : y;
MAX = MAX > z ? MAX : z;
printf("%.3f\n", MAX);
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题6.2 (C语言代码)浏览:745 |
核桃的数量 (C语言代码)浏览:719 |
1024题解浏览:867 |
C语言程序设计教程(第三版)课后习题8.4 (C语言代码)浏览:579 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:558 |
母牛的故事 (C语言代码)浏览:487 |
C语言程序设计教程(第三版)课后习题9.4 (C语言代码)浏览:498 |
1063题 初学者,求帮忙看下,不知道哪错了浏览:234 |
C语言程序设计教程(第三版)课后习题7.3 (C++代码)浏览:479 |
C语言训练-求素数问题 (C语言代码)浏览:622 |