
-----------------------------------
nelsonkkyy
Wed Oct 13, 2010 5:44 pm

Number guessing game in&quot;3 tries&quot;
-----------------------------------
i have a problem with the number guessing game.
I do not know to make it in three tries &This is all i got so far:

import java.io.*;
import java.util.Random;
public class GuessWhatItIs
{
    public static void main (String
Can anyone help how tp make it in only 3 tries??

-----------------------------------
DanShadow
Wed Oct 13, 2010 7:32 pm

RE:Number guessing game in&quot;3 tries&quot;
-----------------------------------
i have a problem with the number guessing game. 
I do not know to make it in three tries &This is all i got so far: 

Here is 1 solution..


boolean guessedIt = false;
Random rand = new Random (); 
int secretNum = rand.nextInt (10) + 1; 
int tries = 0;

for (i=1; i