Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.lang.Math;
  3. public class succ {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. double x1, x2, y1, y2, a, b, c;
  7. x1 = sc.nextDouble();
  8. x2 = sc.nextDouble();
  9. y1 = sc.nextDouble();
  10. y2 = sc.nextDouble();
  11. a = (x2-x1)*(Math.cos(x1*(Math.PI/180)));
  12. b = (y2-y1);
  13. c = Math.sqrt(a*a+b*b)*((Math.PI*12756.274)/360);
  14. System.out.println(c);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement