题解 | #小乐乐计算函数#

小乐乐计算函数

https://www.nowcoder.com/practice/89238e99c36e450786ccf3a9e7481b7b

#include <stdio.h>
int main()
{
    int max(int a,int b,int c);
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    int x,y,z;
    x=max(a+b,b,c);
    y=max(a,b+c,c);
    z=max(a,b,b+c);
    double m;
    m=(double)x/(y+z);
    printf("%.2f",m);
    return 0;
}
int max(int a,int b,int c)
{
    int z,h;
    int max2(int x,int y);
    z=max2(a,b);
    h=max2(z,c);
    return h;
}
int max2(int x,int y)
{
    return x>y?x:y;
}

#牛客创作赏金赛#
全部评论

相关推荐

舂锋:不能投什么岗都用一份简历,一般都是要看企业的岗位需求来写职业技能或者是项目经历,跟岗位相关的就写多一点。
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务