fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int y, x;
  7. cin>> x;
  8. x<5? y=(x*x)-3*x+4:y=x+7;
  9. cout <<y;
  10. return 0;
  11. }
Success #stdin #stdout 0s 15232KB
stdin
3
stdout
4