How many times the following loop will execute ?
int x=2,y=50;
do
{
++X;
Y-=x++;
System.out.println(y);
}while(x<=10):
Answers
Answered by
1
Answer:
5 times loop will execute
Answered by
2
Answer:
int x = 2, y = 50; do { ++x; y- = x++; } while(x <= 10); return y; Ans. The loop will execute 5 times. Value returned is 15.
Similar questions
Computer Science,
11 hours ago
English,
21 hours ago
Hindi,
21 hours ago
Business Studies,
8 months ago
History,
8 months ago
Math,
8 months ago