简单的输出。。。给点意见呗
import import
import
import java.util.Random;
import java.util.Scanner;
public class test {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
String password="";
boolean b =false;
int number = (int) (Math.random() * 1000)+1;
int guess;
System.out.println("请输入一个数:");
int count =9;
while(count>=0){
guess = input.nextInt();
if(number<guess){
System.out.println("太大了,再小一点");
count--;
}else if(number>guess){
System.out.println("太小了,再大一点");
count--;
}else{
break;
}
if(count<=10){
System.out.println("恭喜你像我这么聪明!!!哈哈哈!!!");
}
else{
System.out.println("蠢死了,十次都猜不中,你是猪吗?");
break;
}
}
}
}
输出不了:蠢死了,十次都猜不中,你是猪吗?
怎么改啊。。。。