Computer Science, asked by Anonymous, 8 months ago

Write the output of following code and how many times loop will execute.
(a) int x=5, y=1;
while(x>0)
{
x=x-1;
y=y*x;
System.out.println(y);
}

Answers

Answered by Anonymous
1

Answer:

int x = 2, y = 50; do { ++x; y- = x++; } while(x <= 10); return y; Ans. The loop will execute 5 times.

Explanation:

I think this

Similar questions