package Lessons;
import java.util.Scanner;
public class Math {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("please enter the first number of your question! ");
int a1 = s.nextInt();
System.out.print("So you chose " + a1);
System.out.println(" Choose ur second number");
int a2 = s.nextInt();
System.out.print("You chose " + a2 + " for your second number");
System.out.print(" Now enter ur operator ");
String b1 = s.nextLine();
if (b1.equalsIgnoreCase("-")) {
System.out.println("You chose " + b1 + "as ur operator");
}
}
}
我不明白为什么15行不采取任何输入,任何帮助,将不胜感激:3为什么我的Java扫描仪不能输入?
输出
请输入您的问题的第一个数字! 2552所以,你选择了2552 选择乌尔第二个数字41,您为您的第二号选择41现在 进入乌尔操作
输出端,并在最后一行停止出于某种原因,并没有采取任何信息!
您可以发布您的输出吗? – JavaFanatic