Respuesta :

Answer:

#include <stdio.h>

#include <math.h>

int main()

{

float x1, y1, x2, y2, gdistance;

printf("Input x1: ");

scanf("%f", &x1);

printf("Input y1: ");

scanf("%f", &y1);

printf("Input x2: ");

scanf("%f", &x2);

printf("Input y2: ");

scanf("%f", &y2);

gdistance = ((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1));

printf("Distance between the said points: %.4f", sqrt(gdistance));

printf("\n");

return 0;

}

Here we need two coordinates so we need 4 variables namely x1, y1, x2, y2 to obtain the input from the user and to calculate distance we need another variable. So finally the result should be printed.

ACCESS MORE