Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

i love you

Name: Anonymous 2009-03-17 17:54

//validates if the guess is a valid guess in length
while (SecretCodeDigits == 5 && (userGuess < 10000 && userGuess > 99999)|| (SecretCodeDigits == 4 && (userGuess < 1000 && userGuess > 9999))||(SecretCodeDigits == 3 && (userGuess < 100 && userGuess > 999)));
//excessively long condition                    {
                        System.out.println("please enter a valid guess that is " + SecretCodeDigits + " digits long.");
int userGuess = keyboard.nextInt();
}

It says i have a duplicate local variable for "userGuess".
how can i fix this?

Name: Anonymous 2009-03-18 13:37

>>25

So how would you do a statement like that then?

needing one value in an if statement i.e. 'pounds' to change according to the values in the gui (euros or dollars)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List