fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int i = 1, k = i << 1;
  8.  
  9. switch(k) {
  10. case 1: i += 1;
  11. break;
  12. case 2: i += 2;
  13. break;
  14. default: i += 3;
  15. }
  16. cout << i;
  17. }
  18.  
  19.  
Success #stdin #stdout 0.01s 5272KB
stdin
Standard input is empty
stdout
3