0
Why this code output "No output" while inputting non zero numbers? In c
While inputting zero,it works fine and I get the expected output..... https://code.sololearn.com/c1Zy9KutAh3Y/?ref=app
2 Réponses
+ 4
Because as soon as you input any other number than zero, the for loop becomes an infinite loop.
as apart from scanf() the value of "num" is not changed anywhere through the code (especially inside the loop ) making the condition (num != 0) always true when a non zero digit is entered
+ 1
Arsenic thank you very much 😄...
After seeing your reply only, I identify my simple mistake on this code 😅
Once again thank you arsenic