Find distance between x & y coordinates?
i've researched everywhere & can't find any good help to finish this program. The requirements are to write a complete C++ program that prompts the user for the x and y coordinates of two Cartesian points, then calculates and displays the distance between them. Assume that the coordinate values are whole numbers. The distance between two points having the coordinates (x1, y1) and (x2, y2) is distance = the square root of ([x1 - x2]2 + [y1 - y2]2 ).

Here is my code so far...

    #include <iostream.h>
    #include<math.h>
    using namespace std;
    
    int main()
    {
        //Variables
        double x1,x2;
        double y1, y2;
        double distance;
        
        cout << "Welcome to the Cartesian Points Distance Calculator";
        //Input
        //x1 & y1 Coordinates
        cout << "Please enter x1 coordinate: " ;
        cin >> x1;
        cout << "Please enter y1 corrdinate: " ;
        cin >> y1;
        //x2, y2 Coordinates
        cout << "Please enter x2 coordinate: " ;
        cin >> x2;
        cout << "Please enter y2 coordinate: " ;
        cin >> y2;
        //Process
        distance = sqrt((pow(x1-x2,2))+ (pow(y1-y2,2)));
        //Output
        cout << "The distance between (" << x1 << "," << y1 << ") & (" << x2 << "," << y2 << ") is:" ;
        cout << "/n", distance ;
        System("Pause");
    }

Any help, clues, advice, direction...solutions would be greatly appreciated.
Find distance between x & y coordinates?
===

i've researched everywhere & can't find any good help to finish this program. The requirements are to write a complete C++ program that prompts the user for the x and y coordinates of two Cartesian points, then calculates and displays the distance between them. Assume that the coordinate values are whole numbers. The distance between two points having the coordinates (x1, y1) and (x2, y2) is distance = the square root of ([x1 - x2]2 + [y1 - y2]2 ).

Here is my code so far...

    #include <iostream.h>
    #include<math.h>
    using namespace std;
    
    int main()
    {
        //Variables
        double x1,x2;
        double y1, y2;
        double distance;
        
        cout << "Welcome to the Cartesian Points Distance Calculator";
        //Input
        //x1 & y1 Coordinates
        cout << "Please enter x1 coordinate: " ;
        cin >> x1;
        cout << "Please enter y1 corrdinate: " ;
        cin >> y1;
        //x2, y2 Coordinates
        cout << "Please enter x2 coordinate: " ;
        cin >> x2;
        cout << "Please enter y2 coordinate: " ;
        cin >> y2;
        //Process
        distance = sqrt((pow(x1-x2,2))+ (pow(y1-y2,2)));
        //Output
        cout << "The distance between (" << x1 << "," << y1 << ") & (" << x2 << "," << y2 << ") is:" ;
        cout << "/n", distance ;
        System("Pause");
    }

Any help, clues, advice, direction...solutions would be greatly appreciated.