Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std ;
- int main()
- {
- setlocale(LC_ALL,"rus_rus.1251");
- float x, y;
- cout << "Введите значение икса";
- cin >> x;
- if (x<0)
- {
- y=-4;
- cout << "Значение равно" << y << endl;
- }
- if((x>=0) && (x<1))
- {
- y=x*x+3*x+4;
- cout << "Значение равно" << y << endl;
- }
- if(x>=1)
- {
- y=pow(x*x+3*x+4,2)-1;
- cout << "Значение равно" << y << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement