Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- static int a, b, c;
- int length()
- {
- int x1, y1, x2, y2;
- printf("X1: ");
- scanf("%d", &x1);
- printf("Y1: ");
- scanf("%d", &y1);
- printf("X2: ");
- scanf("%d", &x2);
- printf("Y2: ");
- scanf("%d", &y2);
- return (sqrt(pow((x2-x1),2)+pow((y2-y1),2)));
- }
- int get_length()
- {
- a=length;
- b=length;
- c=length;
- }
- int main()
- {
- get_length;
- printf("%d %d %d", a, b, c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment