解题思路:
注意事项:
参考代码:
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); int [] a =new int[n]; for(int i=0;i<n;i++){ a[i]=scanner.nextInt(); } int max = a[0]; for(int i=0;i<n;i++){ if(max<a[i]){ max = a[i]; } } System.out.print(max); } } }
0.0分
3 人评分