+ 1

Not clear and wrong question.

The did not clearly specified that , there is only one break statement. if there are 2 or more break statements, only one is replaced the loop will have chances of ending.

2nd Mar 2018, 4:07 AM
uday kumar
uday kumar - avatar
2 Answers
+ 15
yes there can be multiple break statments in a loop //for example , u want to come out of loop , if n%13==0 or n%11==0 , then u can write 2 if statements inside that loop to come out of that loop , //alternatively , U can use || , & make it 1 single condition to get out of loop by using break /*and yes , if break occurs by earlier if condition , then it will stop there only , will not go to other break statement[which u replaced with a loop] will not get executed
2nd Mar 2018, 4:18 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 14
which question are you talking about please elaborate the question
2nd Mar 2018, 4:10 AM
GAWEN STEASY
GAWEN STEASY - avatar