Hi, everything running smooth but there is 1 mistake cuz my output is always 0.00000
The function should basically return the distance between the points
idk whats wrong tho.
Thanks for any advice!
Code:
#include <stdio.h>
#include <math.h>
//Distance funktion
double distance(double x1, double y1, double x2, double y2, double erg1){
return sqrt(pow(x2,-x1)+pow(y2,-y1));
}
int main()
{
double x1,y1,x2,y2,erg1;
printf("x1 y1 x2 y2");
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
printf("The distance is %lf", distance);
return 0;
}