Blackjack C Program

Blackjack C Program Rating: 4,6/5 223 reviews

Im tasked with developing a simple blackjack program for a class. The program I have currently compiles and runs but it isnt paying out properly. A blackjack (21) should pay out 1.5*the wager, but it is doing it more than it should. Here is the code I have.

I know the problem is in my if else statements im just not sure how to make it work. Thanks for the help.

  • 3 Contributors
  • forum3 Replies
  • 4,883 Views
  • 7 Hours Discussion Span
  • commentLatest PostLatest Postby spookyfish

This has Blackjack C Program Code resulted in several government lotteries opening safe, regulated online casinos and Blackjack C Program Code poker rooms. Players can have a much higher sense of security knowing their deposits are being handled by the government, but the offerings are limited when it comes to content. This is my first real program, though it has gone through a few major revisions. Anyhow, I am sure that there is a lot I could have done better, cleaner or safer. First Blackjack game in C. Ask Question Asked 7 years, 11 months ago. Active 5 years, 2 months ago. Viewed 13k times 8.

Recommended Answers

This may or may not be part of the problem, but it needs to be adressed:

100.2 General school requirements. Administration of elementary and secondary schools. The board of education of each school district shall employ and assign to each school under its supervision a full-time principal holding the appropriate certification as required pursuant to section 80.4(b) of this Title. This code is a simple blackjack game written in C. pepix/blackjack. Create a console app called BlackJack. Your program will be made up of the following classes: The BlackJack.cs class that has your Main method and that controls the game. The Card.cs class that manages a single card. The DeckOfCards.cs class that manages a deck of cards.

I did the same thing when I was first learning boolean logic and performing tests, and it took me a long time to understand why things are the …

Jump to Post

All 3 Replies

This may or may not be part of the problem, but it needs to be adressed:

I did the same thing when I was first learning boolean logic and performing tests, and it took me a long time to understand why things are the way they are, but for now just trust me.... you would think the above is correct, but there is a specific way that boolean tests are handled, either in a singular expression, or a stand-alone variable (which yeilds true or false, non-zero and zero respectively)

So, keep in mind, boolean logic is handled individually per expression, or as a stand alone TRUE/FALSE flag.

spookyfishcommented:Helped me solve my problem really quickly!+0
When I change the avers word to rank, I discovered this error:

Short answer: If it ain't broke don't fix it -- if you changed variable name avers to rank it is no longer my program, all errors you discover now are yours.
Long answer: Error messages indicate something the compiler can't handle. If you like to change something, not too much at once, so you may see reason-impact-relation. Next, error message could be cryptic, but if the compiler complains about something Project blackjackBlackjackambiguous just make it unambiguous.
BTW, I first had a look about restricted strings not usable as variable names, for nothing. Then I asked 'the Internet' where to find something about 'C++ rank' -- strike -- http://www.cplusplus.com/reference/type_traits/rank/

Blackjack Game In C Programming

One more word, I intentionally baptized that string avers (the opposite of

Blackjack Program Darpa

reverse) as it is only a assemblage of single letter shortcuts of the card face (Jack-Ass-2..9-Ten-Queen-King), it is not a ranking order. I moved Jack to the left for simpler Blackjack identification (Jack+Ace), what seems to be wrong, every value of 10 and an Ace as the first two cards denote BJ. You see, there is still a lot to do for you. For example the default 'Yes' when nothing entered.
For me as C++ novice it was fun (but needless) to define for the first time an objct in C++.