2021-03-24

package edu.xcdq;

public class Demo05 {

public static void main(String[] args) {

int []scores =new int[]{76,45,56,35,99,68};

        int  max = scores[0];

        for (int i =0; i

if (scores[i]>max){

max = scores[i];

            }

}

System.out.println("最大值"+max);

    }

}

你可能感兴趣的:(2021-03-24)