#include #include using namespace std; int main() { //step 0: We'll probably //need some variables //type double is used to store decimal point numbers. double x1; //the first point. double y1; double x2; double y2; double distance; //step 1: Ask user for the first //set of coordiantes, store that point //in some variables. cout << "Please enter a first coordiante point (2 numbers): " << endl; cin >> x1; cin >> y1; //step 2: Ask user for the 2nd //set of points cout << "Please enter a second coordiante point (2 numbers): " << endl; cin >> x2; cin >> y2; //step 2.1: Tell user what point they enter cout << "Ok, your first point is: (" << x1 << ", " << y1 << ")" << endl; cout << "And your second point is: (" << x2 << ", " << y2 << ")" << endl; //step 3: Compute distance between //given 2 points. // pow(2,4) -> 16 distance = sqrt( pow((x2-x1),2) + pow((y2-y1),2) ); //step 4: Tell user the distance cout << "the distance is: " << distance << endl; //step 5: If distance is really far (more than 50), //comment that it's really far if (distance > 50) { cout << "Wow, that's really far!!!" << endl; } else { cout << "eh, that's not too bad of a drive, like just to Harlingen" << endl; } //dumb return thing, just put it in, don't worry why for now return 0; }