网友您好, 请在下方输入框内输入要搜索的题目:
阅读以下说明和Java码,将应填入(n)处的字名写在对应栏内。
[说明] 编写一个字符界面的Java Application 程序,接受用户输入的10个整数,并输出这10个整数的最大值和最小值。
import java. io. * ;
public class abc
{
public static void main(String args [ ] )
{ int i, n = 10 , max = 0 , min = 0 , temp = 0;
try {
BufferedReader br = new BufferedReader(
new InputStreamReader( System. in) );
(1));
} catch ( IOException e ) { } ;
for(i = 2 ;i <= n; i ++ ) {
try {
BufferedReader br = new BufferedReader(
new InputStreamReader (System. in) );
temp = Integer. parselnt(br. readLine( ) );
if ( temp > max ) (2)
if (temp < min) (3)
} catch ( IOExeeption e ) { } ;
System. out. println( "max =" + max + "\nmin =" + min);
}
}
参考答案