main.c 306 B

12345678910111213141516171819
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4. int x = 2;
  5. switch(x)
  6. {
  7. case 1:
  8. printf("x = 1 \n");
  9. case 2:
  10. printf("x = 2 \n");
  11. case 3:
  12. printf("x = 3 \n");
  13. default:
  14. printf("x is not in case");
  15. }
  16. return 0;
  17. }