-
Notifications
You must be signed in to change notification settings - Fork 0
/
П4-19, П4-20.cpp
37 lines (27 loc) · 962 Bytes
/
П4-19, П4-20.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "stdafx.h"
#include <iostream>
#include <cstdlib>
using namespace std;
/*
ÇÀÄÀÍÈÅ Ï4.19; Ï4.20 (à)
*/
int main()
{
setlocale(0, "Russian");
int x, y;
cout << "Ââåäèòå ÷èñëî X: ";
cin >> x;
cout << "Ââåäèòå ÷èñëî Y: ";
cin >> y;
cout << "×èñëî X: " << x << " | ×èñëî Y: " << y << endl << endl << endl;
if ((pow(x, 2) + pow(y, 2)) >= 2 && y <= 4 && y <= pow(x, 2)) {
cout << "M(" << x << ", " << y << ") äëÿ çàäà÷è ï4.19 ïðèíàäëåæèò çàøòðèõîâàííîé îáëàñòè" << endl;
}
else cout << "M(" << x << "," << y << ") äëÿ çàäà÷è ï4.19 íå ïðèíàäëåæèò çàøòðèõîâàííîé îáëàñòè" << endl;
if ((0 <= y <= 8) && (0 <= x <= 8) && ((pow(x, 2) + pow(y, 2)) >= 5)) {
cout << "M(" << x << "," << y << ") äëÿ çàäà÷è Ï4.20 (à) ïðèíàäëåæèò çàøòðèõîâàííîé îáëàñòè" << endl;
}
else cout << "M(" << x << "," << y << ") äëÿ çàäà÷è Ï4.20 (à) íå ïðèíàäëåæèò çàøòðèõîâàííîé îáëàñòè" << endl;
system("pause");
return 0;
}