Hi , i'm trying to do an exercise where the computer has to guess the random number from the range of 1-1000. Currently this is the way i have it set up as. I divide that range in half and store it in guess and then check it against the random number. I'll continue to mod by 2 and compare it against random until i have a match. I dont know if this is the better way to go, any suggestions ? Thanks.
Crutoy 0 Junior Poster in Training
gerard4143 371 Nearly a Posting Maven
VernonDozier 2,218 Posting Expert Featured Poster
spoonlicker -20 Junior Poster
Crutoy 0 Junior Poster in Training
spoonlicker -20 Junior Poster
Crutoy 0 Junior Poster in Training
StuXYZ 731 Practically a Master Poster
Crutoy 0 Junior Poster in Training
Crutoy 0 Junior Poster in Training
Crutoy 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.