问题
填空题
[说明] 编写一个字符界面的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);
答案
参考答案:max = rain = Integer. parselnt (br. readLine( ) )
max = temp;
rain = temp;