Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Trigo{
- public static void main(String[] args){
- Scanner sc = new Scanner(System.in);
- System.out.print("A: ");
- double A = sc.nextDouble();
- System.out.print("B: ");
- double B = sc.nextDouble();
- double tanA=Math.tan(A);
- double tanB=Math.tan(B);
- System.out.println("tan(A+B) = "+ Math.tan(A+B));
- System.out.println("tanA+tanB/(1-tanA*tanB) = "+((tanA+tanB)/(1-tanA*tanB)));
- System.out.println("The values are almost identical, proving the theorem.");
- System.out.println("\nAll values are in radians.")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement