Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- int main()
- {
- float x, y;
- cout << "Write x"<<endl;
- cin >> x;
- if ((x + 2) <= 1) y = pow(x, 2);
- else if (1 < (x + 2) < 10) y = 1 / (x + 2);
- else y = (x + 2);
- cout << "y=" << y << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment