fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int x;
  7. cin>> x;
  8. switch(x){
  9. case -9999 ... 4:
  10. cout <<(x*x-3*x+4);
  11. break;
  12. default:
  13. cout <<(x+7);
  14. }
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
4