Ok, i changed it to where its updating the entry into guess
still not working though. >.< it isnt exiting the while loop? even when guess and nCode match. So am I using the .equals method wrong?
...
Type: Posts; User: connorlm3
Ok, i changed it to where its updating the entry into guess
still not working though. >.< it isnt exiting the while loop? even when guess and nCode match. So am I using the .equals method wrong?
...
Heres current version:
package mat2670;
import java.util.*;
public class Mastermind {
But, program still isnt working right.
--- Update ---
Choose the length of the number you will be trying to guess:
2
Enter your guess:
12
How many digits is determined by the user. i tried changing to loop to go from i = n; i > 0; i-- but it was giving me index out of bounds exceptions
--- Update ---
I got it, changed loop to...
Thanks for that, and no. it doesnt :( lol it prints it out backwards. need it to have 1,2,3,4 if the user enters 1234
Enter your guess:
1234
Guess Array Contains [4, 3, 2, 1]
Kind of, but im taking an int in from the scanner. I wasnt thinking about how it would act at first. If a user entered in 1234, that would be the array would only have 1 number in it at array[0],...
the values of which variables? the rightspot wrongspot or the numbers in the arrays?
--- Update ---
whoah, why would i be getting this? I added print statements after my if-else-if to print...
Im required to make a variation ot the mastermind game. The program uses random numbers to generate a n-digit number. The user chooses the length of the number, n. The user should be allowed to make...