Why do I keep getting an "expected expression error" in my While Loop? [closed]

Because that is not a valid expression.

Change this:

while (player_bet >= 0 && <= end_money)

To:

while (player_bet >= 0 && player_bet <= end_money)

Translation:
while player-bet is 0 or bigger, and also while player-bet is end-money or smaller.


Your original expression is roughly:

while player_bet is zero or bigger and also while (something unknown and not specified) is less than or equal to end-money.

Browse More Popular Posts

Leave a Comment