please help me with this one

Write a c++ program that accepts three card values as inputs and calculates the total value of the hand and display the value of the three cards.

How would I start such?
# include<iostream>

using namespace std;

int main ()

{
int card1,card2, card3, result;

cout<<"Enter the value of the first card: ";
cin>>card1;
cout<<"Enter the value of the second card: ";
cin>>card2;
cout<<"Enter the value of the third card: ";
cin>>card3;
cout<<"Your score is: ";

if (card1==1 && card2==1)
cout<<23;

else if (card1==1)
cout<<11+ card1 + card2;

else if (card2==1)
cout<<card1+ 11 + card3;

else if (card3==1)
cout<<card1+ card2+ 11;

else if (result <= 21)
cout<<"Sorry you lose!"<<endl;
else if (result > 21)
cout<<"Congratulations you win!"<<endl;

return 0;
}



How would I indicate the result?
Topic archived. No new replies allowed.