0

While loop won't execute properly

I'm trying to make a game where the rounds loops until there is a winner. Here is what I have so far: https://code.sololearn.com/cs95W4Uqjdvj When I run the program it only displays the cout commands sometimes. Also how do I set a max for what the program is suppose to count? For this program you make a creature that is suppose to have four wings max. and I thought an if statement would work but it just ignores it. Here is what I have written: if (Wing_P1 == 4) { cout<<"You have the max amount of wings"<<endl; }

29th Feb 2020, 4:05 AM
Ash
Ash - avatar
1 Respuesta
0
You can instead of this if write: if (Wing_P1 >= 4) { cout<<"You have the max amount of wings"<<endl; Wing_P1 = 4; }
29th Feb 2020, 1:57 PM
nodusclient