// zadanie_3_II.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <clocale>
using namespace std;
int main()
{
setlocale(0,"rus");
cout<<"Введите х и у через пробел:\n";
double x,y,r;
cin>>x>>y;
cout<<endl;
if((x<0) || (y<0))
cout<<"Не принадлежит\n";
else
{
r=pow(pow(x,2)+pow(y,2),1.0/2);
if((r>=0.5) && (r<=1))
cout<<"Принадлежит\n";
else
cout<<"Не принадлежит\n";
}
cout<<endl;
system("pause");
return 0;
}
Comments