2021-10-21 09:50:20 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main () {
|
2021-10-21 09:56:47 +00:00
|
|
|
<<<<<<< HEAD
|
2021-10-21 09:50:20 +00:00
|
|
|
|
|
|
|
int max = 5;
|
|
|
|
int i = 1;
|
|
|
|
// i doit être initialisé avant le while
|
|
|
|
while ( i <= max) {
|
|
|
|
// faire tant que i est plus petit ou égal que 5
|
|
|
|
printf("%d \n",i);
|
|
|
|
i = i + 1 ; // compteur,
|
2021-10-21 09:56:47 +00:00
|
|
|
=======
|
2021-10-06 18:32:46 +00:00
|
|
|
int max = 5;
|
|
|
|
|
|
|
|
int i = 1;
|
|
|
|
|
|
|
|
while ( i <= max) {
|
|
|
|
printf("%d \n",i);
|
|
|
|
i = i + 1 ;
|
2021-10-21 09:56:47 +00:00
|
|
|
>>>>>>> 474e609763e292af181a4f975d24c941252e1239
|
2021-10-21 09:50:20 +00:00
|
|
|
}
|
|
|
|
/********************************/
|
|
|
|
/* valeur à la fin */
|
|
|
|
/********************************/
|
2021-10-21 09:56:47 +00:00
|
|
|
<<<<<<< HEAD
|
2021-10-21 09:50:20 +00:00
|
|
|
|
|
|
|
printf("après la boucle i vaut %d \n",i); // dernière valeur de i
|
2021-10-21 09:56:47 +00:00
|
|
|
=======
|
2021-10-06 18:32:46 +00:00
|
|
|
printf("après la boucle i vaut %d \n",i);
|
2021-10-21 09:56:47 +00:00
|
|
|
>>>>>>> 474e609763e292af181a4f975d24c941252e1239
|
2021-10-21 09:50:20 +00:00
|
|
|
return 1;
|
|
|
|
}
|