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

28th Feb 2017, 6:31 PM
UNITED INDIANS COC CLASH OF CLANS
UNITED INDIANS COC CLASH OF CLANS - avatar
3 Réponses
+ 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.
28th Feb 2017, 11:39 PM
Tashi N
Tashi N - avatar
+ 1
thx tashi for ur help... problem with multiple intput yet exists.. ..
1st Mar 2017, 3:37 AM
UNITED INDIANS COC CLASH OF CLANS
UNITED INDIANS COC CLASH OF CLANS - avatar
0
pls check my code for complete program
28th Feb 2017, 6:33 PM
UNITED INDIANS COC CLASH OF CLANS
UNITED INDIANS COC CLASH OF CLANS - avatar