Hello,
i have some troubles with my homework... i need to make quessing game...
i think random number 1-100 and program will queesing this number and asking me for question and i will reply only yes/no
my idea is make lots of this:
System.out.println("is your number greater than 50? yes/no");
String a = sc.next();
if(a.equals("yes")){
System.out.print("is your number geater than 85? yes/no")
.
.
.
.
}
but it is soooo long.. can you help with some better solution?
thank you very much and sorry for my low english