Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Arnab Chakraborty
Page 314 of 377
C++ Program to find the arcsine of the given value
In trigonometry, there are a few ratios that we use the most, sine, cosine, tangent, and some others. From a given angle, these ratios can be calculated. However, if we have the ratio values, we can also calculate the angle using inverse trigonometric functions. In this article, we shall discuss how to get the angle in radian from the sine value through the inverse-sine (arcsine) method in C++. The asin() function The asin() method is used to compute the angle using the inverse trigonometric sine function. This function is present inside the standard library in C++. We need to import ...
Read MoreC++ Program to find the hyperbolic tangent of given radian value
Similar to regular trigonometric functions, hyperbolic functions are defined using the hyperbola rather than the circle. In hyperbolic geometry, hyperbolic functions are used to calculate angles and distances. In addition, they are found in the answers to plenty of linear differential equations, cubic equations, etc. For given angle$\theta$. The hyperbolic tangent function tanh$(\theta)$ is like below β $$\mathrm{tanh(x)\:=\:\frac{sinh(x)}{cosh(x)}\:=\:\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}}\:=\:\frac{e^{2x}-1}{e^{2x}+1}}$$ In this article, we shall discuss the techniques to get the value of tanh$(\theta)$ in C++ when the angle is given in the radian unit. The tanh() function This tanh$(\theta)$ The tanh() function from the C++ cmath library is required for operation. ...
Read MoreC++ Program to find the hyperbolic cosine of given radian value
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 MoreC++ Program to find the hyperbolic sine of given radian value
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 MoreC++ Program to find the tangent of given radian value
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 MoreC++ Program to calculate the cube root of the given number
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 MoreC++ Program to read the height of a person and the print person is taller, dwarf, or average height person
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 MoreC++ Program to calculate the volume and area of Sphere
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 MoreC++ Program to calculate the volume and area of the Cylinder
The cylinder is a tube-like 3D object whose base is a circle and has a certain height. The volume of a cylinder is actually how much space it is taking in the space. In this article, we shall cover a few techniques to calculate the volume and the surface area of a cylinder in C++. A cylinder has two basic parameters. The height β and the radius of its bases π. The surface area of a cylinder can have two variations. Only the outer curved surface (for hollow and both side open cylinder) and area with the curved surface with ...
Read MoreC++ Program to calculate the sum of all odd numbers up to N
Getting series sum is one of the simplest practicing tasks while we are learning programming and logic build up. In mathematics, there are certain ways to find sum of series present in different progressions. In programming, we generate them one by one by implementing the logics, and repeatedly add them to get the sum otherwise perform any other operation if needed. In this article we shall cover techniques to get sum of all odd numbers up to N using C++. There are two possible ways to get this sum with a little variation. Let us see these approaches one by ...
Read More