+ 1
How this question answer 12? I think the answer should be 11.
Int i; For(i=0; i<=6; i++) i+=5; Cout<<i;
6 odpowiedzi
+ 4
Because i<=6 so firstly I=0 then I++ add 1 to 0 then I+= 5 add 5 to 1 then check i<=6 again it is 6<=6? Then add 1 again it is 6+1 then add 5 it is 7+5 ===> 12
+ 3
Cem köylüoğlu
Yes 7 is bigger than 6 but after satisfying condition of i <= 6 i will be incremented by 1 so i would be 7 but after 7 <= 6 will be false so loop will stop to iterate there and it will go outside the loop
So finally i is 7 then 7 + 5 = 12
+ 1
Cem köylüoğlu
No answer should be 12 because of i <= 6 , i++ will increase i with 1 so i would be 7
No i = 7 + 5 = 12
+ 1
Okey right now understood
+ 1
Anthony Dwomoh
Don't spam
0
How 7 bigger then 6. ` 7<=6 `?