To quote the sign that I've seen in offices for the past 30 years
Poor planning on your part does not constitute an emergency on my part
You should have done something much sooner than 6 hours before it's due.
Anyway, array 1 should contain the message to be guessed.
Array 2 should start out filled with _'s for each letter in the message.
For each letter guessed, the letters are filled into this array in the same positions as the message array.
When there are no more _'s in the guessing array, all the letters have been guessed correctly and the player wins.
Specify your requirements more detail....whether it needs 2 dimensional array or what? Either way, it's simple....try this - Loop the array & inside the 1st loop, loop another array(a different declaration name of array)
Only in the hope that the message will get across and that the OP will eventually learn that we're not here to rescue his ass because he spent too much time partying. The intro threads failed to get the message across, so it's time for a high impact approach.
The way to remove a leech is to hold a match to it. Such parasites suck the life out of forums such as this, by adding nothing and taking everything. If they even bother to return, it will only be to show defiance or sobbing. Neither of which will matter a bean.
If some other noob comes across this, they might just think twice about posting such a crappy post themselves.
What purpose is served by someone just posting a complete answer?
Everyone knows the OP would just grab it with both hands, and run straight to the tutor like some dog that had found a new bone. Plus the OP would fool themselves into thinking that either they can still program (they can't), or that there is an infinite supply of sapps on the net to do their homework for them (there isn't).
No, this is much better actually. Better for the whole world that they fail sooner rather than later.
- Better for the OP, so they can resume their search for their true path, knowing programming isn't for them. Programming isn't for everyone any more than accountancy or deep-sea diving is.
- Better for their classmates, who will benefit from the extra tutor attention.
- Better for future co-workers, who won't have to suffer an idiot with a worthless qualification (yes, I've had to deal with people woefully unprepared).
There certainly wasn't time to engage in a discussion (did you see the OP respond in 6 hours)
> But hey, it's not going to hurt just to share. Someone might learn something too, right?
Like how to use "search" to find the many other threads which also attempt the hangman problem. I bet some of those even have answers.