• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help with Comp Sci programming hmwk

Mik3y

Banned
Hey guys. i'm in an intro to comp sci class and i cant happen to get this program set up properly. my assignment is the first one from www.cs1a.com. I'm using dev C++ and this is what i have so far:

#include<iostream>
#include<stdlib.h>
using namespace std;

// This program was created by Mike Tran.

// This program simulates the game of Blackjack.

int main(void)
{
// Variable List
float playerCard1;
float dealerCard;
float playerCard2;

cout << "Enter a number between 1 and 13: ";
cin >> playerCard1;

cout << "Enter another number between 1 and 13: ";
cin >> playerCard2;

cout << "Enter one more number between 1 and 13: ";
cin >> playerCard3;

if (playerCard==1)
{

system ("pause");
}

it's not much yet, but i'm not sure how to set up the if statements in this case. we've done them before, but none this complicated to our standards. if you guys can help me, that'd be great. 🙂
 
if that's all you have you're missing the ending }
edit: also your you need to recheck your variables, you are using some without declaring them
 
<forumnazi> I'd help if this wasn't crossposted to Off-Topic</forumnazi>

:music:
The rules are written in the stone
Break the rules and you get no bones
All you get is ridicule, laughter
And a trip to the house of pain!
:music:
 
Back
Top