So I made a program that's like a little poker game. 5 cards are dealt, user picks which of those cards they want to replace with a new one, and then the program says what the hand is. My program works fine except for the part where I ask to swap cards. When a new card is given, the face value of the card(2,3,4...jack, queen, etc.) is randomly generated just fine but the suit of the card(hearts, spades,clubs,diamonds) stays the same even though I am using the same method. The problem is obviously with my if statement so any help would be greatly appreciated.
Vlad was giving you an example of a place you're missing braces, not fixing it for you. You're missing braces on else if (a==2), else if (b==2), else if (c==2), else if (d==2), and else. Put braces around all these code blocks and you should be fine.