ADVERTISEMENT
ADVERTISEMENT

# Java program to find the hyperbolic sine of an angle

Given an angle, we have to find the hyperbolic sine.
Submitted by Nidhi, on May 14, 2022

Problem Solution:

In this program, we will read a degree from the user using the Scanner class. Then we will find the trigonometric hyperbolic sine of a given angle using the Math.sinh() method and print the result.

Program/Source Code:

The source code to find the hyperbolic sine of an angle is given below. The given program is compiled and executed successfully.

```// Java program to find the hyperbolic sine
// 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 sine is: " + Math.sinh(rad));
}
}
```

Output:

```Enter value in degree: 30
Hyperbolic sine is: 0.5478534738880397
```

Explanation:

In the above program, we imported the "java.util.*" package to use the Scanner class. Here, we created a public class Main that contains a main() method.

The main() method is the entry point for the program. Here, we created a variable degree of double type and read its value from the user using the nextDouble() method of the Scanner class. Then we converted the degree into radian using the Math.toRadians() method. After that, we found the hyperbolic sine using the Math.sinh() method and printed the result.

ADVERTISEMENT
ADVERTISEMENT

Preparation

What's New

ADVERTISEMENT

Top Interview Coding Problems/Challenges!

ADVERTISEMENT

ADVERTISEMENT

Comments and Discussions!

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.