fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. enum class Q{ Q1, Q2};
  5.  
  6. const char* test(const Q value){
  7. switch(value){
  8. case Q::Q1: return "z";
  9. case Q::Q2: return "y";
  10. }
  11. }
  12.  
  13. int main() {
  14. // your code goes here
  15. cout<<"phase1"<<endl;
  16. cout<<test(Q::Q1)<<"!"<<endl;
  17. cout<<"phase2"<<endl;
  18. cout<<test((Q)3)<<"!"<<endl;
  19. cout<<"oops";
  20. return 0;
  21. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
phase1
z!
phase2