#include <iostream>
#include <math.h>
using namespace std;
 
int main()
{
	double a, b, c, d, g, h, dx;
	dx = 0.1;
	cout << "a = ";	cin >> a;
	cout << "b = ";	cin >> b;
	cout << "c = ";	cin >> c;
	cout << "d = ";	cin >> d;
	cout << "g = ";	cin >> g;
	cout << "h = ";	cin >> h;
	bool correct = true;
	if(b < a){    cout<<"Eror b must be large than a";	correct = false;}
	if(c < b){	cout<<"Eror c must be large than b";	correct = false;}
	if(d < c){	cout<<"Eror d must be large than c";	correct = false;}
	if(h < g){	cout<<"Eror h must be large than g";	correct = false;}
	if(correct == true)
	{
		for(double x = g; x <= h; x += dx)
		{
			if(x < a) cout << "F(x) = " << 0 << endl;
			else
				if(x >= a && x < b) cout<<"F(x) = " << pow(x , 2) << endl;
				else
					if(x >= b && x < c) cout<<"F(x) = " << pow(x - 2 , 3) << endl;
					else
						if(x >= c && x < d) cout<<"F(x) = " << pow(pow(x, 3) + 2 * x , 2) << endl;
						else
							if(x >= d) cout << "F(x) = " << 0 << endl;
		}
	}
	system("pause");
	return 0;
}