This commit is contained in:
Andrew 2019-11-18 10:01:42 +07:00
commit 2802401eee
79 changed files with 2650 additions and 0 deletions

View file

@ -0,0 +1,25 @@
// ac_3_10.cpp
// Горбацевич Андрей
#include <iostream>
#include <cmath>
using namespace std;
bool in_D(double x, double y)
{
double R = x*x + y*y;
bool up = (y >= 0);
bool l = (x <= 0);
bool r = (x >= 0);
bool fp = l and (R <= 1);
bool sp = r and (R >= 0.36) and (R <= 1);
return up and (fp or sp);
}
int main()
{
double x, y;
cout << "x, y >>>";
cin >> x >> y;
double P = (in_D(x, y)? x+y : 0 );
cout << "P(x,y)= " << P << endl;
}

View file

@ -0,0 +1,21 @@
// ac_3_11.cpp
// Горбацевич Андрей
#include <iostream>
#include <cmath>
using namespace std;
bool in_D(double x, double y)
{
bool moreTwo = (y >= 2);
bool inAbs = (y >= 2*abs(x));
return moreTwo or inAbs;
}
int main()
{
double x, y, a;
cout << "x, y, a >>>";
cin >> x >> y >> a;
double S = ((in_D(x, y) and (a < 2))? (pow(a, -x)) : log(1 + x*x));
cout << "S(x,y,a)= " << S << endl;
}

View file

@ -0,0 +1,20 @@
// ac_3_9.cpp
// Горбацевич Андрей
#include <iostream>
#include <clocale>
#include <cmath>
using namespace std;
bool in_D(double x, double y)
{
return ((y >= abs(x)) && (x*x+y*y <= 1));
}
int main()
{
double x, y;
cout << "x, y >>>";
cin >> x >> y;
double z = (in_D(x, y)? sin(x) : x + 2 * y );
cout << "z(x,y)= " << z << endl;
}