BREAK AND CONTINUE STATEMENT IN C++

SAIROSHNI

 

Break And Continue Statements In C++

Break

The break statement is used to terminate the loop containing if and transfers the control to the statement immediately after the loop.

Program:

for(6.1,6.2)
{
if(condition)
{
break
}
}

Continue 

Continue is used to bring the program control to the beginning of the loop. It just skips the remaining lines of code in the loop and proceeds with the next iteration.

Program:

for(5.1,6.2)
{
if(condition)
{
continue:
}
}





Tags
Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send