Results 1 to 3 of 3
- 11-01-2011, 08:51 AM #1
Member
- Join Date
- Oct 2011
- Location
- Shrewsbury, Shropshire
- Posts
- 6
- Rep Power
- 0
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
- 11-01-2011, 09:05 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,589
- Blog Entries
- 7
- Rep Power
- 17
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,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 11-01-2011, 09:11 AM #3
Member
- Join Date
- Oct 2011
- Location
- Shrewsbury, Shropshire
- Posts
- 6
- Rep Power
- 0


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks