package com.bieyue1;
import java.util.Scanner;
public class FUshuDemo3 {
public static void main(String[] args) {
Math.floor(Math.random() * 100 + 1);
int num=(int) (Math.random() * 100 + 1);
Scanner sc = new Scanner(System.in);
System.out.println("我想好一个数了,猜猜它是谁");
do {
int a = sc.nextInt();
if(a>num) {
System.out.println("大了");
}
else if(a<num) {
System.out.println("小了");
}else {
System.out.println("恭喜你,猜对了");
}
} while(true);
}
}