Guest User

x1

a guest
Apr 8th, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. static int a, b, c;
  6.  
  7. int length()
  8. {
  9.     int x1, y1, x2, y2;
  10.  
  11.     printf("X1: ");
  12.     scanf("%d", &x1);
  13.     printf("Y1: ");
  14.     scanf("%d", &y1);
  15.  
  16.     printf("X2: ");
  17.     scanf("%d", &x2);
  18.     printf("Y2: ");
  19.     scanf("%d", &y2);
  20.     return (sqrt(pow((x2-x1),2)+pow((y2-y1),2)));
  21. }
  22.  
  23. int get_length()
  24. {
  25.     a=length;
  26.     b=length;
  27.     c=length;
  28. }
  29.  
  30. int main()
  31. {
  32.  get_length;
  33.  printf("%d %d %d", a, b, c);
  34.  return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment