Beginner needs help with function loop do/while | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
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 šŸ‡®šŸ‡³