This is my question. I'm writing a program for an assignment that asks me "Determine the position of the dot M (x, y) relatively to the circle O (xo, yo, r)."
Below is what I have done so far, and I already know WHAT I have to do, but I wanted to know HOW to do it. How would I do the following, for example:
m=x^2 + y^2
and then the square root of m.
Thank you!
#include <iostream>
#include <math.h>
using namespace std;
int main(){
int x, y, m, a, b, r, i=2;
cout<<"Enter the coordinates (Dot) for x and y, respectively."<<endl;
cin>>x;
cin>>y;
cout<<"Enter the coordinates (Circle) for a and b, respectively."<<endl;
cin>>a;
cin>>b;