0
Help me fix this code
Use another compiler not the SL compiler If you add more to char than once, there will be a problem https://code.sololearn.com/cbzlsWSRra8D/?ref=app
10 ответов
+ 2
Do not post your code in the description. Save it in your code bits and attach the link .
If you are running this code in SL , then it won't work as you desire as SL takes all input at once.
+ 1
If you add more to char y than one, then there will be a problem
+ 1
Okay, thanks you Hima
+ 1
you should add N char at last Y char on every input such as
yyyyyyn
0
The code works fine. What's the issue ?
0
Try this input in SL:
Y
Y
Y
N
0
If you input yyyyyy That would be a problem
0
That makes sense as you are not providing the trigger for break condition and this gives you infinite loop.
0
So, how to fix this code?
0
Always append a n in your input.