- 1
What will be the values of x and y after execution and how many times the loop will execute? Can someone explain step by step?
What will be the values of x and y after execution and how many times the loop will execute? Can someone explain step by step? $x=0; $y=0 for($x=1; $x<=5; ++$x) $y= $x++; --$y;
6 Respostas
+ 9
1
+ 7
@@Sarbjot Kaur,
i have created one program on this and i think this one cleared your all doubt
check this at once
thank you
https://code.sololearn.com/wV1FN37JHTxq/?ref=app
+ 3
how this answer came?
+ 1
syntax errors that's for sure.
$x=0; $y=0;
for($x=1; $x<=5; ++$x) {
$y= $x++;
}
--$y;
It will loop 4
y is 4 and x is 7
0
are you still looking for this answer?
0
the answer is 1