Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.lang.Math;
- public class succ {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double x1, x2, y1, y2, a, b, c;
- x1 = sc.nextDouble();
- x2 = sc.nextDouble();
- y1 = sc.nextDouble();
- y2 = sc.nextDouble();
- a = (x2-x1)*(Math.cos(x1*(Math.PI/180)));
- b = (y2-y1);
- c = Math.sqrt(a*a+b*b)*((Math.PI*12756.274)/360);
- System.out.println(c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement