Question: Using C++ Complete the following program that computes the distance between points (x1, y1) and (x2, y2). According to the Pythagorean theorem, the distance is

Using C++

Complete the following program that computes the distance between points (x1, y1) and (x2, y2). According to the Pythagorean theorem, the distance is ((x_2-x_1)+(y_2-y_1))

#include

#include

using namespace std;

int main()

{

double x1;

double y1;

double x2;

double y2;

cin >> x1;

cin >> y1;

cin >> x2;

cin >> y2;

/* Your code goes here */

cout << "Distance: " << distance << endl;

return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!