i am suppose to write a java program tat guess the number thought by the user..the number is between 0 and 1000.If the computer's guess is too high.the user should enter 2.If the computer's guess is too low,the user should enter 1.If the computer's guess is correct,the user should enter any integer except 1 and 2.If the computer takes more than 10 guesses den the computer loses otherswise the user lose..i hope u can help me with this problem..thank you very much
sorry if this seems easy..cos i am a student still learning basic java programming...can anyone help me?
one problem i encounter is getting the computer to guess a number higher or lower den the wrong ans...i felt tat it would be good in narrowing down the range of numbers so tat the computer can guess it..and another is to avoid repeating the same number again...
Question
chankel
hi,i am a student and i need ur help...
i am suppose to write a java program tat guess the number thought by the user..the number is between 0 and 1000.If the computer's guess is too high.the user should enter 2.If the computer's guess is too low,the user should enter 1.If the computer's guess is correct,the user should enter any integer except 1 and 2.If the computer takes more than 10 guesses den the computer loses otherswise the user lose..i hope u can help me with this problem..thank you very much
sorry if this seems easy..cos i am a student still learning basic java programming...can anyone help me?
one problem i encounter is getting the computer to guess a number higher or lower den the wrong ans...i felt tat it would be good in narrowing down the range of numbers so tat the computer can guess it..and another is to avoid repeating the same number again...
Link to comment
Share on other sites
3 answers to this question
Recommended Posts