题解 | #小乐乐找最大数#
小乐乐找最大数
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;
}
简单题
查看2道真题和解析