Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "rus");
- int n, k = 0;
- double x, y, r;
- cout << "Введите кол-во точек: ";
- cin >> n;
- cout << "Введите радиус окружности: ";
- cin >> r;
- for (int i = 0; i < n; i++) {
- cout << "Введите координаты точки - (x, y): ";
- cin >> x >> y;
- if (x >= 0 && x * x + y * y <= r * r)
- k++;
- }
- cout << "Точек принадлежит фигуре - " << k << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement