Developpement/23DEV1.1/TPS1/TP01/controle/Calibre.c

21 lines
377 B
C
Raw Normal View History

2024-12-09 11:53:11 +01:00
#include <stdlib.h>
#include <stdio.h>
int main(void) {
int num, i;
while(num<1 || num>9){
printf("Entrez la longueur désirée (entre 1 et 9) : ");
scanf("%d", &num);
}
printf("|");
for(i = 1 ; i <= num ; i++){
printf("''''!''''|");
}
printf("\n");
printf("0");
for(i = 1 ; i <= num ; i++){
printf(" %d", i);
}
printf("\n");
return EXIT_SUCCESS;
}