Quick actions

cmd+k|ctrl+k

Navigation

Languages

ПР 2 (Белоусов АТ-201) 

Snippet info

Language

Cpp

Visibility

public

Author

bilousov10a

Created

2020-10-03T18:10:51Z

Updated

2020-10-03T18:32:48Z

#include <iostream>
#include <cmath>
using namespace std;



void task19()
{
	cout << "Task:19\n";
	cout << "e^x - (y^2 + 12xy - 3x^2) / 18y - 1";
	double x = 0, z = 0, y = 0;
	long double expl;
	cout << "\n\nInput X:";
	cin >> x;
	
	cout << "\n\nInput Y:";
	cin >> y;

    	if (18*y - 1 ==0)
	{
		cout << "No solutions at X = " << x;	
	}
	else

    {
	    z = expl - (y*y + 12*x*y - 3*x*x) / 18*y - 1;
	    cout << "Z(" << x << ") = " << z;
	}


	cout << "\n\n";

}

void task15()
{
	cout << "Task: 15\n";

	cout << "2 ctg 3x - 1 / (12x^2 + 7x - 5)";
	double x = 0, z = 0;
	cout << "\n\nInput X:";
	cin >> x;

	if ((sin(3 * x) == 0) || (12 * x * x + 7 * x - 5 == 0))
	{
		cout << "No solutions at X = " << x;	
	}
	else
	{
		z = 2 * cos(3*x)/sin(3*x) - 1 / (12 * x * x + 7 * x - 5);
		cout << "Z(" << x << ") = " << z;
	}

	cout << "\n\n";
}

void task23()
{
	cout << "Task:23\n";
	cout << "3^x - 4x + (y - √|x|) ";
	double x = 0, z = 0, y = 0;
	cout << "\n\nInput X:";
	cin >> x;
	
	cout << "\n\nInput Y:";
	cin >> y;

{
		z = pow(3, x) - 4*x +(y - sqrt(abs(x)));
		cout << "Z(" << x << ") = " << z;
	}


	cout << "\n\n";
}


void task27()
{
    cout << "Task:27\n";
    cout << "cos^2 (sin (1/x))";
    double x = 0, z = 0;
    cout << "Input X:";
    cin >> x;
    	if (x == 0)
	{
		cout << "No solutions at X = " << x;	
	}
	else
	{
		z = cos(sin(1/x));
		cout << "Z(" << x << ") = " << z;
	}
	
}

void task11()
 {
     cout <<"Task:11\n";
     cout <<"(1 + 1 / x^2)^x - 12*x^2*y";
     double x = 0, y = 0, z = 0;
     cout << "Input X:";
     cin >> x;
     
     cout << "Input Y:";
     cin >> y;
     if (pow(x, 2) == 0)
     {
         cout << "No solutions at X =" << x;
         
     }
     else 
     {
         z = pow((1 + 1 / x*x), x) - 12*pow(x,2)*y;
         cout << "Z(" << x << ") =" << z;
     }
 }


int main()



{
	system("cls");

	
    task19();
    task15();
    task23();
    task27();
    task11();
  
}
INFO