diff options
1 files changed, 24 insertions, 0 deletions
| -rw-r--r-- | Sem. 02/Solutions/07. point_in_circle | 24 |
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"; + } +} |
