VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Attempt to play blackjack but as my first program come into some dificulty and require assistance!

by Kieran Fowler (1 Submission)
Category: Games
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 11th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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!



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

Download this snippet    Add to My Saved Code

Attempt to play blackjack but as my first program come into some dificulty and require assistance! Comments

No comments have been posted about Attempt to play blackjack but as my first program come into some dificulty and require assistance! . Why not be the first to post a comment about Attempt to play blackjack but as my first program come into some dificulty and require assistance! .

Post your comment

Subject:
Message:
0/1000 characters