package com.java.develep.four;
public class ArrayDemo05 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int score[]={10,50,78,98,72,86,45};
int max=0,min=0;
max=min=score[0];
for(int i=0;i<score.length;i++)
{
if(score[i]>max)//
{
max=score[i];
}
if(score[i]<min)
{
min=score[i];
}
}
System.out.println("最高的成绩是:"+max);
System.out.println("最低的成绩是:"+min);
}
}