diff options
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.cpp | 24 |
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"; + } +} |
