0

Beginner needs help with function loop do/while

It seems like the value first entered in scanf() is not deleted, if the requirement is not met and so it keeps continuing in an endless loop or am I getting it wrong ? Would appreciate some help as a beginner :D https://code.sololearn.com/cXOVghzHz0y1/?ref=app

4th May 2022, 8:10 PM
Justin Eigbefoh Oamen
3 ответов
0
Remove scanf("%*s");
4th May 2022, 8:39 PM
Jayakrishna 🇮🇳
0
Jayakrishna🇮🇳 i tried but its still the same issue
4th May 2022, 8:50 PM
Justin Eigbefoh Oamen
0
How you are inputting? space separate or line by line? Try scanf("%*c") ; Instead better to use getchar();
4th May 2022, 8:54 PM
Jayakrishna 🇮🇳