import java.util.Arrays;public class Demo4_6_10 { public static void main(String[] args) { // TODO Auto-generated method stub// int scores[]={1,2,3,4,5,6,7,8,9}; int num[]={1,2,3,4,5,6,7,8,9}; fun(num,0); } public static void fun(int scores[],int a){ for(int i=0;i<scores.length;i++){ if(scores[i]<a){ a=scores[i]; } } System.out.println(Arrays.toString(scores)); } }
添加回答
举报
0/150
提交
取消