题解 | #小乐乐找最大数#
小乐乐找最大数
http://www.nowcoder.com/practice/ae6a21920cac4f9184c8ecfcc87f89b9
#include <stdio.h>
int main()
{
int arr[4] = { 0 };
int b = 0;
int e = 0;
while (b < 4)
{
scanf("%d", &arr[b]);
b++;
}
for (int c = 1; c < 4; c++)
{
if (arr[0] < arr[c])
{
e = arr[0];
arr[0] = arr[c];
arr[c] = e;
}
}
printf("%d\n", arr[0]);
return 0;
}