📄 appmm.java
字号:
import java.io.*;
public class AppMM
{
public static void main(String args[])
{
int a[];
a = new int [10];
int i=0;
String s = "a";
System.out.print("Enter a integer array containing ten numbers:");
try{
for(;i<10;i++)
{
BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
s = in.readLine();
a[i]=Integer.valueOf(s).intValue();
}
}catch(IOException e) {};
int Max=0,Min=a[0],j=0;
for(;j<10;j++)
{
if(Max<a[j])Max=a[j];
if(Min>a[j])Min=a[j];
}
System.out.print("最大值为:"+Max);
System.out.print("最小值为:"+Min);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -