Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / Solutions / 07. Point_in_circle.cpp
diff options
context:
space:
mode:
Commit173a2099ce5f3d935ee9a4dc91140b2aedc04ee2 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-10-14 13:49:08 +0300
Committer
 GitHub <noreply@github.com>
2021-10-14 13:49:08 +0300
Fileseae67a6c045d1cc11e3f2ac253d8ae52111c02e0 /Sem. 02/Solutions/07. Point_in_circle.cpp
Introduction_to_programming_FMI-173a2099ce5f3d935ee9a4dc91140b2aedc04ee2.tar
Introduction_to_programming_FMI-173a2099ce5f3d935ee9a4dc91140b2aedc04ee2.tar.gz
Introduction_to_programming_FMI-173a2099ce5f3d935ee9a4dc91140b2aedc04ee2.zip
Parent758091b600c2cc076589e62fb40a2472fbe59f0b (diff)
Rename 07. Point_in_circle to 07. Point_in_circle.cpp
1 files changed, 24 insertions, 0 deletions
-rw-r--r--Sem. 02/Solutions/07. Point_in_circle.cpp24
diff --git a/Sem. 02/Solutions/07. Point_in_circle.cpp b/Sem. 02/Solutions/07. Point_in_circle.cpp
new file mode 100644
index 0000000..ef45c6e
--- /dev/null
+++ b/Sem. 02/Solutions/07. Point_in_circle.cpp
@@ -0,0 +1,24 @@
+#include <iostream>
+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";
+ }
+}