The Artima Developer Community
Sponsored Link

Java Answers Forum
guess the number game

1 reply on 1 page. Most recent reply: Oct 10, 2008 12:41 AM by Vincent O'Sullivan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Trey Danial

Posts: 1
Nickname: trey706
Registered: Oct, 2008

guess the number game Posted: Oct 9, 2008 4:42 PM
Reply to this message Reply
Advertisement
i wanna create the game "guess the number game" but need help using import java.util.scanner and import java.random. here is the information if you are willing to help


The program chooses the number to be guessed by selecting an integer at random in the range 1 to 10. The program then displays the following:

-I have a number between 1 and 10.
-Can you guess my number?
-Please type your first guess.

The player then types a first guess. The program responds with one of following:

-1. Excellent! You guessed the number!
Would you like to play again (y or n)?
-2. Too low. Try again.
-3. Too high. Try again.

If the player’s guess in incorrect, your program should loop until the player finally gets
the number right. Your program should keep telling the player too high or too low to help
the player ‘zero in’ on the correct answer.


Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: guess the number game Posted: Oct 10, 2008 12:41 AM
Reply to this message Reply
What kind of help do you "wanna" get?

Are you hoping that we'll take time away from our work to do you homework for you, so that you can pass it off as your own work?

If not, can you post the work that you have done so far and we'll help you to get over the bits that are preventing you from completing it.

Flat View: This topic has 1 reply on 1 page
Topic: applet-servlet socket communication Previous Topic   Next Topic Topic: Unboxing or toString()?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use