DEV1-21-22/Exemples/semFor.c

34 lines
486 B
C
Raw Normal View History

2021-10-12 19:56:39 +02:00
#include <stdio.h>
#include <stdlib.h>
int main (void) {
int i = 0;
for (i = V1; conditionSur(i); i = f(i) ) {
calcul();
}
/* Pareil que */
i = V1;
for( ; conditionSur(i) ; i = f(i)) {
Calcul();
}
/* Pareil que */
for (i = V1; conditionSur(i); ) {
Calcul();
i = f(i);
}
/* Pareil que */
for (i = V1; ; i = f(i)) {
if (ConditionSur(i)) {
Calcul();
} else {
break;
}
}
/* Pareil que */
i = V1;
while (ConditionSur(i)) {
Calcul();
i = f(i);
}
}