Java Program to Find the Hyperbolic Tangent of an Angle

Java program to find the hyperbolic tangent of an angle

// Java program to find the hyperbolic tangent 
// of an angle

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner X = new Scanner(System.in);

    double degree = 0;

    System.out.print("Enter value in degree: ");
    degree = X.nextDouble();

    double rad = Math.toRadians(degree);

    System.out.print("Hyperbolic tangent is: " + Math.tanh(rad));
  }
}

Output

Enter value in degree: 90
Hyperbolic tangent is: 0.9171523356672744
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment