Re: A noob in need of help!
I'm tempted to say this is a generally bad algorithm, but here goes...
Code:
Guess = Guess - (Guess/2);
should be something like:
Code:
Guess+=(Guess/2);
//or
Guess = Guess + (Guess/2);
you can also run into this problem... Guess comes to 3, and their number is two.
Code:
guess>number
guess/2
guess<number
guess+=guess/2
this is how it looks to a computer (kinda)
Code:
3>2
3/2=1
1<2
1/2=0; 0+1=1;
then it goes into an infinite loop...
perhaps you should go with the more conventional version of this program: the program picks a random number and the user guesses it.