public class test {
public static void main(String[] args) {
//数组求最大值
int[] arry = {11,43,12,4,1,56,34};
int max = arry[0];
for (int i = 0; i < arry.length; i++) {
if(arry[i]>max){
max=arry[i];
}
}
System.out.println(max);
}
}
数组求最大值
最新推荐文章于 2024-07-02 00:50:11 发布