This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2024_Stanislav_Mykhailenko/Lesson_1/Task_7/main.cpp
Stanislav Mykhailenko 0ae4eb5552
Fix Lesson 1
2024-06-11 10:48:26 +03:00

30 lines
465 B
C++

#include <cmath>
#include <iostream>
using namespace std;
int main()
{
float x = 0;
float y = 0;
float N = 0;
float distance = 0;
cout << "Enter your x: ";
cin >> x;
cout << "Enter your y: ";
cin >> y;
cout << "Enter radius N: ";
cin >> N;
distance = sqrt(pow(x, 2) + pow(y, 2));
cout << distance << " from the center";
if (distance > N)
cout << " (beyond radius)";
cout << endl;
return 0;
}