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

21 lines
377 B
C

#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;
}