请高手帮忙,帮帮小弟吗,我快急疯了

[复制链接]
查看11 | 回复0 | 2004-12-9 15:41:00 | 显示全部楼层 |阅读模式
public class ArrayMaxMin
{

void GetMinMax()
{
int[] x = new int[5];
int i,Min,Max;
System.out.print("请输入5个整数的数组:&quot

;
for (i = 0; ix)Min = x;
if (Maxx) Min = x;
if (Max < x) Max = x;
}
System.out.println("最大数为:"+Max);
System.out.println("最小数为:"+Min);
}
public static void main(String[] args)
{
ArrayMaxMin array1=new ArrayMaxMin();
try{
array1.GetMinMax();
}catch (IOException e){


}
}
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行