Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // lb1.2.8.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <cmath>
- #include <iostream>
- using namespace std;
- int main() {
- double r, x, y;
- setlocale(LC_ALL, "rus");
- cout << "Введите R, x, y" << endl;
- cin >> r;
- cin >> x;
- cin >> y;
- if ((pow(x + r, 2) + pow(y + r, 2) <= pow(r, 2) && y >= x) || (pow(x - r, 2) + pow(y - r, 2) <= pow(r, 2) && y <= x)) {
- cout << "Точка (" << x << ";" << y << ") принадлежит заштрихованной области графика" << endl;
- }
- else {
- cout << "Точка (" << x << ";" << y << ") не принадлежит заштрихованной области графика" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement