0
Int y; for(y=1;y<=5;y+=3) cout <<y; почему отсюда выходит output 7?
help me
4 ответов
+ 2
The output should be 14.
y = 1.
y <= 5 is true.
Output: 1
y += 3 is 4.
y <= 5 is true.
Output: 4
y += 3 is 7.
y <= 5 is false.
So, cout doesn't run.
I suggest reviewing the for loop in the course.
If there are no brackets the first statement in the code is considered inside the loop.
0
l think as you,but this programme gives 7!!!really amazing
0
put this in compiler and you saw the same
0
У Вас, скорее всего, перед cout где то фигурные скобки спрятались.