Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Principal {
- public static void main(String[] args)
- {
- Scanner s=new Scanner(System.in);
- System.out.println("A: ");
- double a = s.nextDouble();
- System.out.println("Beta: ");
- double beta = s.nextDouble();
- System.out.println("B: ");
- double b = s.nextDouble();
- double resul = beta*2*Math.PI/360;
- double r = Math.sqrt(a*a+2*a*b*Math.cos(resul)+b*b);
- System.out.println(r);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement