#include #include using namespace std; int main() { //step 0: declare variables and whatever stuff you need double x1; double x2; double y1; double y2; double distance; //step 1: ask user to enter 2 coordinates (x1,y1), (x2,y2) cout << "Please enter a coordiante (2 numbers): "; cin >> x1; cin >> y1; cout << "Please enter a second coordinate (2 numbers): "; cin >> x2; cin >> y2; //step 2: apply distance formula! //Use the cmath functions sqrt() and pow() if you want. distance = sqrt( pow(x1-x2,2) + pow(y1-y2,2) ); //step 3: tell user the distance! cout << "The distance between your points is: " << distance << endl; //step 4: Comment on how far the points are... if (distance > 100) { cout << "Wow that's farther than the city Pharr!!!!" << endl; } if (distance < 5) { cout << "Cool, those points are basically nieghbors!" << endl; } if (distance > 40 && distance < 60) { cout << "Cool, that's totally biking distance" << endl; } //step 5: Tell user goodbye cout << "Ok, thanks for playing the distance caculator game, goodnight." << endl; return 0; }