June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
9
Task/Guess-the-number/VBA/guess-the-number.vba
Normal file
9
Task/Guess-the-number/VBA/guess-the-number.vba
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Sub GuessTheNumber()
|
||||
Dim NbComputer As Integer, NbPlayer As Integer
|
||||
Randomize Timer
|
||||
NbComputer = Int((Rnd * 10) + 1)
|
||||
Do
|
||||
NbPlayer = Application.InputBox("Choose a number between 1 and 10 : ", "Enter your guess", Type:=1)
|
||||
Loop While NbComputer <> NbPlayer
|
||||
MsgBox "Well guessed!"
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue