0
This program is working in drjava but showing compilation error in code playground of sololearn
import java.util.*; public class guess{  public static void main (String[]args){     int let;     Random gen = new Random();     int answer =gen.nextInt(10);   System.out.println("i am thinking one digit number  between 0 and 9");   System.out.println("Can u guess it");      do{   let = inner();   if (let==answer) {    System.out.println("Right");}   else { if (let<answer) { System.out.println("too low, My number ="+answer);  System.out.println("Pls try again");} else { System
3 Answers
+ 7
I tried to get your code working:
https://code.sololearn.com/cZkj2n68YYA3/?ref=app
There were some problems with characters playground can't interprete, } too much before while, the while condition wasn't correct.
You will see, that I limited to 3 attempts, because unfortunately playground doesn't allow multiple separate inputs -.-
But now you can try to work at the playground if you still want to.
+ 1
thx tashi for ur help... problem with multiple intput yet exists.. ..
0
pls check my code for complete program