Re: help needed on inputting - tearing hair out .. please!!!




"patrick_woflian" <gingercrock@xxxxxxxxxxx> wrote in message
news:1133218389.092549.289920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> well.. i dont know how wrong my code is.. but i desparetly need help
> hehe.. the psuecode solution is as follows:
>
> Roll a 12 sided die to choose a number in the range 1....12
> while the user has not made an incorrect guess
> ask the user to guess whether they think the next number will be higher
> or lower than the current number
> prompt the user to enter either "hi" or "lo"
> choose a new random number by rolling a 12 sided die
> if the users guess was correct
> increment a count of correct guesses
> update the stroed current number
> end if
> end while
> the game is over - tell the user how many correct guesses they made..
>
> any ideas how to change my program!?!?

I noticed that in your pseudo code, it sounds like you only ever ask the
user for a number once (not sure though, because the "while the user has not
made an incorrect guess" part is a bit vague to me). If that's the case, you
should really re-evaluate why in your Java code you're asking the user for a
number twice.

- Oliver


.



Relevant Pages

  • Re: help needed on inputting - tearing hair out .. please!!!
    ... i dont know how wrong my code is.. ... the psuecode solution is as follows: ... Roll a 12 sided die to choose a number in the range 1....12 ...
    (comp.lang.java.help)
  • Re: AKICIF: Probability/math question
    ... >infinite number of times you would expect the average roll to be 3.5, ... >say you are presented with a set of data where a 6 sided die was ... >rolled 100 times and the average roll was 4.5. ... >the probability of getting an average roll of 4.5 or higher over 100 ...
    (rec.arts.sf.fandom)
  • AKICIF: Probability/math question
    ... probabilities for rolling dice? ... infinite number of times you would expect the average roll to be 3.5, ... say you are presented with a set of data where a 6 sided die was ... rolled 100 times and the average roll was 4.5. ...
    (rec.arts.sf.fandom)
  • Re: AKICIF: Probability/math question
    ... > infinite number of times you would expect the average roll to be 3.5, ... > say you are presented with a set of data where a 6 sided die was ... > the probability of getting an average roll of 4.5 or higher over 100 ... variance and the standard deviation are easily calculated using ...
    (rec.arts.sf.fandom)
  • Re: Last Man Standing (06 - MAY - 06)
    ... I have three more incorrect guesses to add to the list. ... Quarters Bank Roll ... If the winner is OUS, ... The answer is both a colloquial banking term and a ubiquitous ...
    (rec.games.pinball)