DEV/DEV1.1/TP05:Boucles/sequencefor.c
2022-09-28 16:42:11 +02:00

20 lines
266 B
C

#include <stdio.h>
int main() {
int n;
int m;
int i;
printf("Veuillez saisir 2 entiers separer d'un espace.\n");
scanf("%d",&n);
scanf(" %d",&m);
if (n>m){
for (i=m;i<=n;i++){
printf("%d\n",i);
}
} else{
for (i=n;i<=m;i++){
printf("%d\n",i);
}
}
return 0;
}