In the following program segment, which variable is the loop control variable (also known as the counter

Question:

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);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: