fork download
  1. #include <stdio.h>
  2.  
  3. //EDIT: Somehow I wrote 'numID' instead of 'numberID'...
  4. void test(int numberID) {
  5. switch (numberID){
  6. case 0:
  7. if (1) {
  8. puts("0");
  9. } else
  10. case 1:
  11. if (1) {
  12. puts("1");
  13. } else
  14. case 2:
  15. if (1) {
  16. puts("2");
  17. }
  18. }
  19. }
  20.  
  21. void main() {
  22. test(0);
  23. test(1);
  24. test(2);
  25. //EDIT: Apearently compilebot self-destructs if I don't do this...
  26. }
Runtime error #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
0
1
2