0
Why this code not available for output
#include <stdio.h> int main() { int x=6; int i=0; while(x>0) { if(x/10==0){ i++; } } printf ("\n %d",i); return 0; }
3 Respuestas
+ 2
since the condition need to check if x is less than zero to stop, the value of x need to be decreased where ever you want it to
+ 12
You have made infinite while() loop.
Condition x>0 will always be true,so to correct it you can do some upgradation in value of x inside while() loop to make it a finite loop & avoid "Time limit execedded"
0
Anybody answer me