+ 1
How many times will be the loop execute? What value will be returned?
int x= 2, y=50; do{ ++x; y-=x++; } while(x<=10) return y;
2 Answers
+ 2
You can simply create a code in the playground section and run it if you want to test something.
Assuming you fix the missing semicolon and provide the other necessary code, you would find the loop runs five times, returning fifteen at the end.