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