In the following program segment, which variable is the loop control variable (also known as the counter variable) and which is the accumulator?
int a, x = 0, y = 0;
while (x < 10)
{
a = x * 2;
y += a;
x++;
}
System.out.println("The sum is " + y);
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.