64.6k views
1 vote
Write a statement that terminates the current loop when the value of the int variables x. and y.are equal

1 Answer

1 vote
To rite a statement that terminates the current loop when the value of the int variables x. and y.are equal please check below:

if (x == y) break; // exit loop

I hope the answer will help you. Thank you.

User Jondlm
by
6.6k points