标签:style blog http color java ar 2014 div sp
import java.util.*; public class GuessNumber { public static void main(String[] args) { int num = new Random().nextInt(100), temp; Scanner sc = new Scanner(System.in); while (true) { temp = sc.nextInt(); if (temp < num) { System.out.println("太小了"); } else if (temp > num) { System.out.println("太大了"); } else System.out.println("猜对了"); } } }
标签:style blog http color java ar 2014 div sp
原文地址:http://www.cnblogs.com/fantasy12436109/p/3971858.html