Mega Code Archive
Categories
/
C
/
Code Snippets
Use break to terminate a for loop
#include
int main(void) { int j; for(j = 0; j < 100; j++) { printf("%d ", j); if(j == 11) break; } return 0; }