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

22 lines
268 B
C
Raw Permalink 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){
while (n>=m){
printf("%d\n",m);
m++;
}
} else{
while (m>=n){
printf("%d\n",n);
n++;
}
}
return 0;
}