标签:
1 import java.util.Scanner; 2 3 public class Solution 4 { 5 public static void main(String[] args) 6 { 7 Scanner input = new Scanner(System.in); 8 9 int number1 = (int)(Math.random() * 100); 10 int number2 = (int)(Math.random() * 100); 11 12 System.out.print(number1 + " + " + number2 + " = ? "); 13 int sum = input.nextInt(); 14 15 input.close(); 16 17 if(sum == number1 + number2) 18 System.out.println("True"); 19 else 20 System.out.println("False"); 21 } 22 }
标签:
原文地址:http://www.cnblogs.com/wood-python/p/5759351.html