一、输出数组的最小值
package cn.tedu.lili;
import java.util.Arrays;
public class Demo02 {
public static void main(String[] args) {
//输出数组最小值
int[] nums = new int[]{12,10,3,6,15};//
int min = nums[0];
for(int i=1;i<=nums.length-1;i++){
if(min>nums[i]){
min = nums[i];
}
}
System.out.println(min);
}
}
输出:3

二、输出数组的最小值图:
用Java代码输出数组的最小值

相关文章:

  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案