Guest User

Untitled

a guest
Jun 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. float x, y;
  6. std::cin >> x;
  7.  
  8. if (x > 2) {
  9. y = 1 / (x * x + 4 * x + 5);
  10. }
  11. else {
  12. y = x * x + 4 * x + 5;
  13. }
  14.  
  15. std::cout << y;
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment