fork download
  1. #include <stdio.h>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5.  
  6. int main(void) {
  7. int x = 5;
  8. int y = 2;
  9. char op = '*';
  10. switch (op) {
  11. default : x += 1;
  12. case '+' : x += y;
  13. case '-' : x -= y;
  14.  
  15. }
  16. cout <<x;
  17. return 0;
  18. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
6