how to use break in for loop in c code example
Example: how to break a loop in c
// The code will print your number 10 times if x <= 100
int x = 120;
for (int i = 0; i < 10; i++)
{
if (x > 100)
// Note: if multiple for loops: breaks the superficial one
break;
else
printf("%i\n", x);
}