+ 1
Can the while loop structure execute statements repeatedly when the expression is false?
C
1 Respuesta
+ 3
Yes it can, just use the logical NOT operator to test the expression:
#include <stdio.h>
int main()
{
int i = 5;
while(!(i > 9)) // start with false
i++;
printf("%d\n", i);
}