This compiles but does not show me any results? Why
#include <iostream>
#include <cmath>
using namespace std;
void dist(int x1, int x2, int y1, int y2)
{
double r1 , r2 , d ;
r1 = sqrt((x1*x1) + (y1*y1));
r2 = sqrt((x2*x2) + (y2*y2));
d = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
cout << " Distance from first point to origin :" << r1 << endl;
cout << " Distance from second point to origin :" << r2 << endl;
cout << " Distance between the two points:" << d << endl;
}
int main()
{
int x1, x2, y1, y2;
cout << " Enter values for x1 x2 y1 y2\n";
cin >> x1 >> x2 >> y1 >> y2 ;
dist(x1, x2, y1, y2);
char aaaa;
cin >> aaaa;
return 0;
}