From 589cfb7a86cb9b474eae40d97ea8ec1bfa7f2e48 Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Thu, 14 Oct 2021 13:47:25 +0300 Subject: Create 07. point_in_circle --- Sem. 02/Solutions/07. point_in_circle | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Sem. 02/Solutions/07. point_in_circle diff --git a/Sem. 02/Solutions/07. point_in_circle b/Sem. 02/Solutions/07. point_in_circle new file mode 100644 index 0000000..ef45c6e --- /dev/null +++ b/Sem. 02/Solutions/07. point_in_circle @@ -0,0 +1,24 @@ +#include +using namespace std; + +int main() +{ + int x; + int y; + int radius; + + cin >> x >> y >> radius; + + if (x * x + y * y < radius * radius) + { + cout << "In the circle"; + } + else if (x * x + y * y == radius * radius) + { + cout << "On the circle"; + } + else + { + cout << "Out of the circle"; + } +} -- cgit v1.3.1-23-gd82d