21 lines
381 B
C
21 lines
381 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <math.h>
|
||
|
|
||
|
int main(void){
|
||
|
double x1;
|
||
|
double x2;
|
||
|
double y1;
|
||
|
double y2;
|
||
|
double res;
|
||
|
printf("Donnez la coordonée 1 : \n");
|
||
|
scanf("%lf", &x1);
|
||
|
scanf("%lf", &y1);
|
||
|
printf("Donnez la coordonée 2 : ");
|
||
|
scanf("%lf", &x2);
|
||
|
scanf("%lf", &y2);
|
||
|
res= sqrt(pow((x1-x2),2)+pow((y1-y2),2));
|
||
|
printf("%lf", res);
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|