public class java { public static void main(String[] args) { int[]nums= new int[10]; for (int i=0;imax){ max =nums[i]; } } System.err.println("数组元素中最大值为:"+max); } }
用java(数组)随机输出十个数,并且输出这个数组中最大值
关注
打赏
public class java { public static void main(String[] args) { int[]nums= new int[10]; for (int i=0;imax){ max =nums[i]; } } System.err.println("数组元素中最大值为:"+max); } }
微信扫码登录