import java.util.Random; import java.util.Scanner; public class test_02 { public static void main(String[] args) {
Random r = new Random();
int suggest = r.nextInt(100)+1;
Scanner sr = new Scanner(System.in);
int count = 0;
while (true){
System.out.println("Please input a number:");
int number = sr.nextInt();
if(number > suggest) {
System.out.println("Big");
count++;
}
else if (number < suggest){
System.out.println("Smile");
count++;
}
else if (number == suggest) {
System.out.println("YOu successfully");
break;
}
}
System.out.println("You use chance are"+count+1);
}
}