DEV/DEV1.1/TP05:Boucles/sequencedo.c

22 lines
278 B
C
Raw Normal View History

2022-09-28 16:42:11 +02:00
#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){
do {
printf("%d\n",m);
m++;
} while (n>=m);
} else{
do {
printf("%d\n",n);
n++;
} while (m>=n);
}
return 0;
}