题解 | #小乐乐找最大数#

小乐乐找最大数

https://www.nowcoder.com/practice/ae6a21920cac4f9184c8ecfcc87f89b9

#include <stdio.h>
int max(int a,int b)
{
if(a>=b)
return a;
else
return b;
}
int main() {
    int x1,x2,x3,x4;
    scanf ("%d %d %d %d",&x1,&x2,&x3,&x4);
    int max_1=max(x1,x2);
    int max_2=max(x3,x4);
    int max_3=max(max_1,max_2);
    printf ("%d",max_3);
    return 0;
}

简单题

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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