DEV/DEV1.1/TP07/for.c

17 lines
429 B
C
Raw Permalink Normal View History

2024-09-17 16:21:33 +02:00
#include <stdio.h>
#include <stdlib.h>
int main() {
int entier1;
int entier2;
printf("Veuillez entrer un premier entier\n");
scanf("%d", &entier1);
printf("Veuillez entrer un deuxieme entier plus grand que le premier\n");
scanf("%d", &entier2);
for (;entier1 > entier2; entier2 = entier2 + 1) {
printf("%d\n", entier2);}
for (;entier2 > entier1 ; entier1 = entier1 + 1 ) {
printf("%d\n", entier1);
}
}