c2
This commit is contained in:
parent
0d75f30a49
commit
4744ebb565
69 changed files with 7 additions and 5 deletions
20
1sem/adaptation courses/03/9.cpp
Normal file
20
1sem/adaptation courses/03/9.cpp
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue