test4.3

来源:互联网 发布:招在家工作淘宝客服 编辑:程序博客网 时间:2024/06/06 09:42

不知道为什么,我按了Ctrl C循环却没有停下来

/*target:process while until stop it yourself

 * methods:enter "Ctrl+C" to stop;
 */
import java.util.*;
public class Test3 {
public static void main(String[] args) {
Random rand=new Random();
while(true)
{
int m=rand.nextInt(50);int n=rand.nextInt(50);
if(m>n)
System.out.println("Bigger");
else if(m<n)
System.out.println("Smaller");
else
System.out.println("Equal");
}
}
}
0 0
原创粉丝点击