Author: Not specified Language: c
Description: Not specified Timestamp: 2017-09-21 18:04:21 +0000
View raw paste Reply
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main()
  4. {
  5. int x1, y1, x2, y2;
  6. float d;
  7. printf("Input the coordinates\n");
  8. scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
  9. d = sqrt(pow((y2-y1), 2) + pow((x2-x1), 2));
  10. printf("The distance between given points > %f", d);
  11. }
View raw paste Reply