I have just started using C++ for the first time and I love it!!!
First problem I have encoutered proably a simple one but
for (int a=0; a<10; a++) {
for (int b=0; b<10; b++) {
for (int c=0; c<10; c++) {
if (b == 5) {
break; beak; break; break;
}
}
}
}
Now the idea is if b is equal to 5 then it breaks out of the if loop, the for loop c, the for loop b, the for loop a.
Am I doing it right?
If not can someoone please correct me?
Thankyou, Regards X
PS: While on the topic what happens if I only wanted to break out of the if loop or if loop + for loop a or if loop + for loop a + for loop b. Thanks Again.