Hey guys, i started to program my first app. It is a poker calculator.
so briefly, all i want is that when in texas holdem poker i see 3 cards in the center and 2 in my hands, i am able to know my percentage of having a pair or triple. ALl im asking, i to check the bottom of it, to see whats wrong. When i try to compile it, it is always putting the number 10.25%. to understand better, read at the bottom bottom.
#include "stdafx.h"
#include <iostream>
//forward declaration of threecard
int main()
{
using namespace std;
//enter number card in my hand
cout << "Enter Card:";
int x;
cin >> x;
//enter number card2 in my hand
cout << "Enter Card:";
int y;
cin >> y;
//enter number card1 in middle
cout << "Enter Middle card 1:";
int card1;
cin >> card1;
//enter number card2 in middle
cout << "Enter Middle card 2:";
int card2;
cin >> card2;
//enter number card3 in middle
cout << "Enter Middle card 3:";
int card3;
cin >> card3;
if (x=card1)
cout << "10.25%";
else
cout <<"0.0";
return 0;
}
So if i give x value of 5, and card1 value of 5, its writting 10.25%.
But, if i give x value of 5 and card1 value of 6, card 2 value of 7, card 8 value of 9, its still 10,25%. But i want 0.0%.