+ 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.
2 odpowiedzi
+ 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
+ 14
which question are you talking about please elaborate the question