# include # include using namespace std; int main ( ) // // CIRCLE.CPP reads a point (X,Y) from the user, // and determines whether it is inside the unit circle. // // The square root function sqrt() comes from . // { float x, y; cout << "Enter (x,y): "; cin >> x >> y; if ( sqrt ( x * x + y * y ) <= 1.0 ) { cout << "(" << x << "," << y << ") is in the unit circle.\n"; } else { cout << "(" << x << "," << y << ") is NOT in the unit circle!\n"; } return 0; }