0
What will be the value of x after the following code is executed?
int x = 10; for (int y = 5; y < 20; y +=5) x += y;
1 Respuesta
+ 4
Values of y considered:
5
10
15
10+5+10+15=40
Thus, x becomes 40
int x = 10; for (int y = 5; y < 20; y +=5) x += y;