#include #include using namespace std; float F(float x) { if (x*x + 2 * x + 1 < 2) return x*x; else if (2 <= x*x * 2 + 1 < 3) return 1 / x*x - 1; else return 0; } void F(float x, float &y) { if (x*x + 2 * x + 1 < 2) y = x*x; else if (2 <= x*x + 2 * x + 1 < 3) y = 1 / x*x - 1; else y = 0; } int main() { float x; float y; cout << "x="; cin >> x; cout<<"F(x)=" << F(x) << endl; F(x, y); cout<<"F(x,y)="<<"("<< x << ";" << y<<")" << endl; system("pause"); return 0; }