Update while.c
This commit is contained in:
parent
f479d8d205
commit
25fe9af023
14
TP3/while.c
14
TP3/while.c
|
@ -1,7 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main () {
|
||||
<<<<<<< HEAD
|
||||
|
||||
int max = 5;
|
||||
int i = 1;
|
||||
|
@ -10,24 +9,11 @@ int main () {
|
|||
// faire tant que i est plus petit ou égal que 5
|
||||
printf("%d \n",i);
|
||||
i = i + 1 ; // compteur,
|
||||
=======
|
||||
int max = 5;
|
||||
|
||||
int i = 1;
|
||||
|
||||
while ( i <= max) {
|
||||
printf("%d \n",i);
|
||||
i = i + 1 ;
|
||||
>>>>>>> 474e609763e292af181a4f975d24c941252e1239
|
||||
}
|
||||
/********************************/
|
||||
/* valeur à la fin */
|
||||
/********************************/
|
||||
<<<<<<< HEAD
|
||||
|
||||
printf("après la boucle i vaut %d \n",i); // dernière valeur de i
|
||||
=======
|
||||
printf("après la boucle i vaut %d \n",i);
|
||||
>>>>>>> 474e609763e292af181a4f975d24c941252e1239
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue