Results 1 to 3 of 3
  1. #1
    Dave013 is offline Member
    Join Date
    Oct 2011
    Location
    Shrewsbury, Shropshire
    Posts
    6
    Rep Power
    0

    Default Not sure if someone could help me with this

    I dont suppose anybody could help with this Java program for 'Guess A number'

    //think of a number and allow the user to guess it

    import java.util.*;

    public class ThinkNumber
    { public static void main (String args[])
    { //generate number in range 1 - 100 //prompt user to enter guess
    //loop until correct number is guessed //check guess and output hint
    //guess is correct - output count
    }
    }

    Thank you

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,309
    Blog Entries
    7
    Rep Power
    20

    Default Re: Not sure if someone could help me with this

    Class Random can do part of the job; a while loop can do most of the rest of the job; give it a try.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Dave013 is offline Member
    Join Date
    Oct 2011
    Location
    Shrewsbury, Shropshire
    Posts
    6
    Rep Power
    0

    Smile Re: Not sure if someone could help me with this

    Thank you I will see if that will help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •