You have your scanf()
s in wrong positions.
The second scanf()
will read the input X
and it will make the condition of do-while
loop false. Therefore, the loop body won't run again and therefore Player 1 = X
isn't printed.
You should remove both of your scanf()
s and instead of them add one scanf()
inside the do-while
loop, before the switch
statement.
do{
scanf(" %c", &P1_SIGN); // put scanf() here
switch (P1_SIGN) { //entrata segni
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…