Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main() {
- float x1;
- float x2;
- float y1;
- float y2;
- float d;
- int r;
- int r2;
- scanf("%f%f%f%f", &x1, &y1, &x2, &y2);
- d = sqrt(pow(x2-x1, 2) + pow(y2-y1,2));
- r = x1 > 0 && y1 > 0;
- r2 = (x1 > 0 && y1 > 0 && x2 > 0 && y2 > 0) || (x1 < 0 && y1 < 0 && x2 < 0 && y2 < 0) ;
- printf("%.2f %d %d", d, r, r2);
- //COLOQUE SEU CODIGO AQUI...
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement