Skip to content

Commit 4ff4d55

Browse files
authored
Update and rename Qsort1.c to 1015.c
1 parent bff6b74 commit 4ff4d55

File tree

2 files changed

+25
-38
lines changed

2 files changed

+25
-38
lines changed

Revisões/Revisão - A/1015.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <stdio.h>
2+
#include <math.h>
3+
4+
typedef struct
5+
{
6+
double x,y;
7+
}Ponto;
8+
//////////////////////////////////////////////////////
9+
double distancia(Ponto p1,Ponto p2);
10+
//////////////////////////////////////////////////////
11+
int main(void)
12+
{
13+
Ponto a,b;
14+
15+
scanf("%lf %lf %lf %lf",&a.x,&b.x,&a.y,&b.y);
16+
17+
printf("%.4lf\n",distancia(a,b));
18+
19+
return 0;
20+
}
21+
//////////////////////////////////////////////////////
22+
double distancia(Ponto p1,Ponto p2)
23+
{
24+
return sqrt(pow(p1.y-p1.x,2) + pow(p2.y-p2.x,2));
25+
}

Revisões/Revisão - A/Qsort1.c

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)