标签:math random number answer temp
import java.util.Scanner; if(answer==number1-number2){
System.out.println("your answer is good!");
}
else{
System.out.println("your answer is false!");
System.out.println("the true answer is "+(number1-number2));
}
}
}
使用Math.random()方法来获得一个0.0到1.0之间的随机数。
标签:math random number answer temp
原文地址:http://blog.51cto.com/13670741/2093596