fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int x=2;
  5. switch(x)
  6. {
  7. case 2.3: printf("d");
  8. break;
  9. case 2.7: printf("5");
  10. break;
  11. case 3.7: printf("5y");
  12.  
  13. }
  14.  
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7: error: case label does not reduce to an integer constant
prog.cpp:9: error: case label does not reduce to an integer constant
prog.cpp:11: error: case label does not reduce to an integer constant
stdout
Standard output is empty