Computer Science, asked by vaibhavsingh8, 11 months ago

int x=2 y=50; do{ ++x; y-=x++; }while(x<=10) return y;​

Answers

Answered by vasudevka
63

Answer:15(5 times)

Explanation:x=2

++x=3

y=50-3=47

x++=4

4<=10

++x=5

y=47-5=42

x++=6

6<=10

x++=7

y=42-7=35

++x=8

8<=10

x++=9

y=35-9=26

++x=10

10<=10

x++=11

y=26-11=15

++x=12

12 is not <=10

Therefore, the loop terminates returning the value of y as 15

Answered by ayushmanc67
3

Answer:

answer is 15 or 5 times

Explanation:

Similar questions