Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- #include<stdlib.h>
- int main () {
- float a,b,c,d,dist=0;
- printf("digite o primeiro ponto:");
- scanf("%f",&a);
- printf("o segundo:");
- scanf("%f",&b);
- printf("o terceiro:");
- scanf("%f",&c);
- printf("por fim,o ultimo ponto:");
- scanf("%f",&d);
- dist=sqrt(pow(b-a,2)- pow(d-c,2));
- printf("A distancia entre estes pontos sera %.0f\n\n",dist);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment