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.
Object Oriented C programming: Blackjack game Create a C program using basic class and class conversions. Simple Blackjack Program I recently took an intro to c programming class and faced a large number of problems when coding my final project. To ease the pain for anyone going through the same experience, this is the my final project.
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
- 3,128 Views
- 7 Hours Discussion Span
- commentLatest Postby spookyfish
This may or may not be part of the problem, but it needs to be adressed:
Blackjack Program
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.
C++ Blackjack Program
spookyfish commented: Helped me solve my problem really quickly!+0