题解 | #小乐乐找最大数#
小乐乐找最大数
http://www.nowcoder.com/practice/ae6a21920cac4f9184c8ecfcc87f89b9
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a=new int[4]; int k=0; for(int i=0;i<4;i++) { a[i]=sc.nextInt(); if(a[i]>k) { k=a[i]; } } System.out.println(k); } }