Home > Back-end >  A small problem about the while loop
A small problem about the while loop

Time:10-17

Why the input Numbers don't quit the loop

CodePudding user response:

 cir=the scanf (" % c ", & amp; Alp); 

When you enter 2, alp as' 2 ', cir is 1, certainly continue to cycle

CodePudding user response:

Numbers and characters, alp receiving '2' character, what is wrong?

CodePudding user response:

refer to the original poster if water ovo reply:
why input Numbers don't quit the loop

In addition, execute at least one time, use the do... While better

CodePudding user response:

2 is also a character that is the '2' input,

Suggest use CTRL + d (LINUX) or CTRL + z (Windows) try

  • Related