- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7346 Articles for C++
175 Views
Hyperbolic functions, which are defined using the hyperbola rather than the circle, are comparable to normal trigonometric functions. Hyperbolic functions are used in hyperbolic geometry to compute angles and distances. They also show up in the solutions to a large number of linear differential equations, cubic equations, etc. For given angle$\theta$. The hyperbolic cosine function cosh$(\theta)$ is like below $$\mathrm{cos(x)\:=\:\frac{e^x\:+\:e^{-x}}{2}\:=\:\frac{e^{2x}+1}{2e^x}\:=\:\frac{1+e^{-2x}}{2e^{-x}}}$$ In this article, we shall discuss the techniques to get the value of cosh$(\theta)$ in C++ when the angle is given in the radian unit. The cosh() function This cosh$(\theta)$ operation needs the cosh() function from the cmath package in ... Read More
202 Views
Normal trigonometric functions have analogous to hyperbolic functions, which are defined using the hyperbola rather than the circle. In hyperbolic geometry, hyperbolic functions are used to calculate angles and distances. Additionally, they appear in the answers to a lot of linear differential equations, cubic equations, etc. For given angle$\theta$. The hyperbolic sine function sinh$(\theta)$ is like below. $$\mathrm{sinh(x)\:=\:\frac{e^x\:-\:e^{-x}}{2}\:=\:\frac{e^{2x}-1}{2e^x}\:=\:\frac{1-e^{-2x}}{2e^-x}}$$ In this article, we shall discuss the techniques to get the value of sinh$(\theta)$ in C++ when the angle is given in the radian unit. The sinh() function To compute the sinh$(\theta)$ The sinh() function from the cmath package will be used. ... Read More
436 Views
The right-angled triangle is the subject of the trigonometry concept known as the Tangent. The ratio between the angle's opposing leg and its adjacent leg when it is thought of as a right triangle is the trigonometric function for an acute angle. To calculate the tangent, we need to know the angle between the hypotenuse and the adjacent edge. Let the angle is π. The tan$(\thetaπ)$ is like below: $$\mathrm{tan(\theta)\:=\:\frac{opposite}{adjacent}}$$ In this article, we shall discuss the techniques to get the value of tan$(\thetaπ)$ in C++ when the angle is given in the radian unit. The tan() function To compute ... Read More
334 Views
Cosine is a trigonometric term that deals with right-angled triangle. When an acute angle is thought of as being a member of a right triangle, the cosine trigonometric function measures the distance between the angle's neighbouring leg and the hypotenuse. We require the angle between the hypotenuse and the adjacent edge in order to calculate cosine. Let the angle is π. The cos$(\theta)$ is like below $$\mathrm{cos(\theta)\:=\:\frac{adjacent}{hypotenuse}}$$ In this article, we shall discuss the techniques to get the value of cos$(\theta)$ in C++ when the angle is given in the radian unit. The cos() function To compute the cos$(\theta)$ The ... Read More
489 Views
Sine is a trigonometric parameter that deals with the right-angled triangle. The sine is the ratio of the opposite side to the hypotenuse. While calculating sine, we need the angle between the hypotenuse and the opposite side. Let the angle is π. The sin(π) is like below β $$\mathrm{sin(\theta)\:=\:\frac{opposite}{hypotenuse}}$$ In this article, we shall discuss the techniques to get the value of sin(π) in C++ when the angle is given in the radian unit. The sin() function To compute the sin(π) we need to use the sin() method from the cmath library. This function takes the angle in radian and ... Read More
2K+ Views
In different applications calculating logarithms for base 2 is somewhat necessary. There are a few shortcut methods to remember a few log values for competitive exams. While using programming, we have a handful of options to calculate logarithm results from library functions and also some tricks to compute them. In this article, we shall discuss a few techniques to compute logarithm base 2 for a given number in C++. Using log2() function The log2() is one library function that is used to calculate the logarithm base 2 for a given parameter. The answer may be an integer or floating point ... Read More
3K+ Views
Multiplying the same number thrice is termed as the cube of that number. Or we can say the number raised to power 3. For instance 3 * 3 * 3 = 27, which is a cubic number. But if we want to perform the reverse operation, we need to find the cube root of the number. For example $\sqrt[3]{27}$ = 3. In this article, we shall discuss how to calculate the cube root of a given number in C++. There are a few different techniques to do so. Using cbrt() function The cbrt() is one library function that is used ... Read More
2K+ Views
The highest Common Factor or Greatest Common Divisor are factors that are maximum and that can divide two or more values without generating any remainder. In this article, we shall discuss a few methods to perform HCF / GCD between two numbers in C++. This is simply a mathematical solution and there are several algorithms present to find GCD. The Euclidean method to find GCD is common. The same algorithm we will use in iterative mode, and recursive mode. Using Iterative method The iterative solution for the Euclidean gcd finding algorithm is shown in the algorithm section. Algorithm ... Read More
904 Views
A personβs height determines whether he/ she is tall, dwarf, or average height person. In different regions of the world, the height ranges are different. We are considering Indian standards. In this article, we shall cover how to write a simple program to determine whether a person is taller, dwarf, or of average height person in C++. Let us define the height range and corresponding classification first, then we can use them in the algorithm as well as in our implementation. Height (cm) Type 150 β 170 Average 170 β 195 Tall Below ... Read More
5K+ Views
The Sphere is a ball-like 3D object whose all sides are curved surfaces. On a sphere, no plane surface is there. The volume of a sphere is actually how much space it is taking in the space. In this article, we shall cover the techniques to calculate the volume and the surface area of a sphere in C++. A sphere has one basic parameter. The radius π. We will see the techniques to calculate the volume and area one by one. The volume of a Sphere To calculate the volume of a sphere, we need one input, the radius π. ... Read More