public static void guessNumber(int select){//接收输入数
Scanner input = new Scanner(System.in);
int level = 0 ;
String str [ ] = {"次就中,鬼才","次就中,天才","次就中,人才"};
switch(select){
case 1 :
level = 10 ; break;
case 2 :
level = 50 ; break;
case 3 :
level = 100 ; break;
default :
break;
}
System.out.println();
int Num ,i;
int lastNum = (int)(Math.random() * (level - 1)) + 1;
for(i = 0 ; i < str.length; i ++){
Num = input.nextInt();
if(Num == lastNum){
System.out.println((i+1) + str [i]);
break;
}
else if (Num > lastNum)
System.out.println("猜的数大了");
else if (Num < lastNum)
System.out.println("猜的数小了");
}
if(i == 3)
System.out.println("\n3次都不中,废材");
}