0
Why doesn't this code print anything?
#include <stdio.h> int main () { int a = 10; while(a <= 20) { if( a == 15) { // skip the iteration //a = a + 1; continue; } printf("value of a: %d\n", a); a++; } return 0; }
3 Antworten
+ 1
You can use break instead of continue to get out of the while loop; continue just goes back to the beginning of the while.
0
I already figured out what was happening. Thanks for your help