这是我唯一无法创建的程序。请帮帮我。
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int i = 0, j=0;
do {
System.out.print("Enter number: ");
i = input.nextInt();
i=j;
}
while (i == j);
System.out.println("You have inputted the same number on the previous.");
}
答案 0 :(得分:0)
干杯m8,祝你考试好运:D
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int i = 0, j = 999999, input = 0;
do {
i = j;
System.out.print("Enter number: ");
input = input.nextInt();
j=input;
} while (i != j);
System.out.println("You have inputted the same number on the previous.");
}