This is a discussion on "[SOLVED] Help with guess a number program" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Help with guess a number program are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Help with guess a number program
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Help with guess a number program
I need help with this Guuess a number program> Its probly easy for for you but I'm brand new at this javascript stuff. Antways here what i got make work and what I have got so far.
Guess a number program- The user will pick a number from 1 to 1000. Your program should guess the user number in ten tries or less.After each guess the user will specify if the guess is low or high or correct. This what I have so far.
Last edited by Rakuli; Oct 13th, 2007 at 22:54. Reason: Please use [html][/html] BBC when placing code. Thanks |
|
|
|
#2
|
|||
|
|||
|
Re: Help with guess a number program
OK, to start with let's get rid of your syntax errors:
- Your function name was not valid. - You were missing a '{' at the beginning of the first IF statement. - I know that you don't have end each line with a semicolon, but it's good programming practice to do so. So, here is your corrected code:
- the highnum, lownum, count, and guess variables need to be declared and initialized outside of the Guess() function. - the value of the 'counter' input box should be "counter" and not "guess" Good Luck and if you really get stumped, feel free to ask some more questions.
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#3
|
|||
|
|||
|
Re: Help with guess a number program
Thanks for the help Your Hints and correction are greatly apreciated
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Insert new row without knowing number of columns?? | nate2099 | Databases | 2 | Dec 27th, 2007 03:51 |
| [SOLVED] IP Number | Stormraven | Webforumz Cafe | 2 | Nov 10th, 2007 20:30 |
| Guess What | Daniel | Webforumz Cafe | 9 | Feb 27th, 2007 20:20 |