-
November 24th, 2012, 03:56 PM
#1
Random Number Guessing Game
I don't understand where I am doing something wrong. The instructions is to create a random application that generates a random number in the range of 1 through 100. If it's too low state "too low, try again" and the same for if it's too high.
(I'm using visual basic)
So I declared my variables and wrote a code for the procedure. I declared x as my integer. Any advice on how to correct it?
Thanks for all help
intNum = rand.Next(100) + 1
For
For x > intNum
MsgBox("Too high, try again")
Next
For x < intNum
MsgBox("Too low, try again")
Next
For x = intNum
MsgBox("You guessed right!")
Next
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|