Advertisement
yanni_yagami

catégorie d'un enfant

Dec 6th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.     int age;
  5.     printf("age : ");
  6.     scanf("%d", &age);
  7.  
  8.     switch(age) {
  9.         case 6:
  10.         case 7: printf("poussin"); break;
  11.  
  12.         case 8:
  13.         case 9: printf("pupille"); break;
  14.  
  15.         case 10:
  16.         case 11: printf("minime"); break;
  17.  
  18.         case 12:
  19.         case 13:
  20.         case 14:
  21.         case 15: printf("cadet"); break;
  22.  
  23.         default: printf("categorie incorrecte");
  24.     }
  25.  
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement