Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / Solutions
diff options
context:
space:
mode:
Commit589cfb7a86cb9b474eae40d97ea8ec1bfa7f2e48 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-10-14 13:47:25 +0300
Committer
 GitHub <noreply@github.com>
2021-10-14 13:47:25 +0300
Filescd7779993f9c3c1330aa3fb8646114c73a8964d9 /Sem. 02/Solutions
Introduction_to_programming_FMI-589cfb7a86cb9b474eae40d97ea8ec1bfa7f2e48.tar
Introduction_to_programming_FMI-589cfb7a86cb9b474eae40d97ea8ec1bfa7f2e48.tar.gz
Introduction_to_programming_FMI-589cfb7a86cb9b474eae40d97ea8ec1bfa7f2e48.zip
Parentef81325538b17291c892460721b9c0d88bc8543a (diff)
Create 07. point_in_circle
1 files changed, 24 insertions, 0 deletions
-rw-r--r--Sem. 02/Solutions/07. point_in_circle24
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 <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";
+ }
+}