fin TP05 et début TP06

This commit is contained in:
2023-09-19 15:01:30 +02:00
parent f92804ce8d
commit 7ea4eeae0b
8 changed files with 82 additions and 0 deletions

BIN
DEV1.1/TP06/sequence Executable file

Binary file not shown.

21
DEV1.1/TP06/sequence.c Normal file
View File

@@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int val1,val2,temp,compteur=0;
printf("Donnez un entier : \n");
scanf("%d",&val1);
printf("Donnez un deuxieme entier : \n");
scanf("%d",&val2);
if (val2<val1){
temp=val1;
val1=val2;
val2=temp;
}
while (compteur!=(val2-val1)){
printf("%d\n",val1+compteur);
compteur+=1;
}
printf("%d\n",val2);
return EXIT_SUCCESS;
}