Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std ;
  4. int main()
  5. {
  6. setlocale(LC_ALL,"rus_rus.1251");
  7. float x, y;
  8. cout << "Введите значение икса";
  9. cin >> x;
  10. if (x<0)
  11. {
  12. y=-4;
  13. cout << "Значение равно" << y << endl;
  14. }
  15. if((x>=0) && (x<1))
  16. {
  17. y=x*x+3*x+4;
  18. cout << "Значение равно" << y << endl;
  19. }
  20. if(x>=1)
  21. {
  22. y=pow(x*x+3*x+4,2)-1;
  23. cout << "Значение равно" << y << endl;
  24. }
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement