- Home
·
- Games
·
- Attempt to play blackjack but as my first program come into some dificulty and require assistance!
Attempt to play blackjack but as my first program come into some dificulty and require assistance!
Attempt to play blackjack but as my first program come into some dificulty and require assistance! Any help will be great, thank you very
Rate Attempt to play blackjack but as my first program come into some dificulty and require assistance!
(1(1 Vote))
Dim suit As Integer
Dim card As Integer
Dim credit As Integer
Dim bet As Integer
Dim suit2 As String
Dim count As Integer
Dim real As String
credit = 100
Do
bet = InputBox("you have " & credit & " pounds. How much would you like to bet?")
If bet > credit Then MsgBox "sorry you dont have that much money"
Loop Until bet <= credit
Do
count = 1
suit = Rnd * 4 + 0.5
card = Rnd * 13 + 0.5
real = face
If suit = 1 Then suit2 = Clubs
If suit = 2 Then suit2 = Spades
If suit = 3 Then suit2 = Diamonds
If suit = 4 Then suit2 = hearts
If card = 1 Then real = Ace
If card = 2 Then real = Two
If card = 3 Then real = Three
If card = 4 Then real = Four
If card = 5 Then real = Five
If card = 6 Then real = Six
If card = 7 Then real = Seven
If card = 8 Then real = Eight
If card = 9 Then real = Nine
If card = 10 Then real = Ten
If card = 11 Then real = Jack
If card = 12 Then real = Queen
If card = 13 Then real = King
count = count - 1
Loop Until count = 0
MsgBox real
End Sub
Attempt to play blackjack but as my first program come into some dificulty and require assistance! Comments
No comments yet — be the first to post one!
Post a Comment