解题思路:
注意事项:
参考代码:
#include<stdio.h> #define MAX(x,y)x>y?x:y double max(double a,double b,double c){ double t=a>b?a:b; t=t>c?t:c; return t; } int main(){ double a,b,c; scanf("%lf %lf %lf",&a,&b,&c); double t=MAX(a,b); t=MAX(t,c); printf("%.3f",max(a,b,c)); printf("%.3f",t); }
0.0分
2 人评分