import java.util.Scanner;
public class Test02{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int max=0,b=0;
System.out.print("请输入第1个数:");
max=in.nextInt();
for(int i=2;i<=10;i++){
System.out.print("请输入第"+i+"个数:");
b=in.nextInt();
if(max<=b){
max=b;
}
}
System.out.print("最大值为: "+max);
}
}
ps:需要什么java练习题的答案可以评论,并关注后续博客![大笑](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)