fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. auto x = 1;
  6.  
  7. switch(x)
  8. {
  9. case 1:
  10. case 2:
  11. case 3:
  12. std::cout << "x is 1, 2 or 3\n";
  13. break;
  14. default:
  15. std::cout << "default\n";
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
x is 1, 2 or 3