Scanner in = new Scanner(System.in);出错
import java.util.Scanner;
public class Main1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int age=19;
for (int i = 0; i < 4; i++) {
if (i==3) {
System.out.println("您的次数已用完!");
continue;
} else {
int k =in.nextInt();
if (k==age) {
System.out.println("恭喜猜对了");
break;
} else {
if (k>age) {
System.out.println("猜错了,猜大了");
} else {
System.out.println("猜错了,猜小了");
}
}
}
}
}
}