0

why it is not show any output when run this program #include<iostream> using namespace std; int main(){ for(;;){ int i=0; if(i==1){ cout<<i; break; } ++i; }}

2nd Sep 2016, 6:28 PM
Lekhraj Singh
Lekhraj Singh - avatar
2 Réponses
+ 3
Every loop you're instantiating a new variable i equals zero, try to put int i=0 outside the for loop.
2nd Sep 2016, 7:33 PM
renanfonteles
0
since initial final and value of increment and decrement is not given the loop is not giving any output.
4th Sep 2016, 4:21 PM
kartik