标签:stat nbsp str input tin string [] port public
1 import java.util.Scanner; 2 public class AdditionQuiz { 3 public static void main(String[] args){ 4 int number1 = (int)(System.currentTimeMillis()%10); 5 int number2 = (int)(System.currentTimeMillis()/10%10); 6 int number3 = (int)(System.currentTimeMillis()/100%10); 7 Scanner input = new Scanner(System.in); 8 System.out.println("What is " + number1 + " + " + number2 + " + " + number3 + "?"); 9 int answer = input.nextInt(); 10 System.out.println(number1 + " + " + number2 + " + " + number3 + " = " + answer + " is " + (number1+number2+number3 == answer)); 11 } 12 }
标签:stat nbsp str input tin string [] port public
原文地址:https://www.cnblogs.com/cherrydream/p/9800901.html