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 Aman Sharma
Page 4 of 6
How to find the Arc Tangent of a given value in Golang?
In this tutorial, we will learn how to find the Arc Tangent of a given value in the Golang programming Language. Golang language has many packages with predefined functions that the developer can use without writing the complete logic To perform the mathematical operations and logic we have a math package in Golang. We will use this package only to find the Arc Tangent of a given value. We will also see how to import the package and also how to call a function this package consists of by writing a Golang code. Arc Tangent Definition Arc Tangent is a ...
Read MoreHow to find the Arc Sine of a given value in Golang?
In this tutorial, we will learn how to find the Arc Sine of a given value in the Golang programming Language. Golang language has many packages with predefined functions that the developer can use without writing the complete logic. To perform the mathematical operations and logic we have a math package in Golang. We will use this package only to find the Arc Sine of a given value. We will also see how to import the package and also how to call a function this package consists of by writing a Golang code. Arc Sine Definition Arc Sine is ...
Read MoreHow to Find all Roots of a Quadratic Equation in Golang?
In this tutorial, we will find the root of a quadratic equation using the Golang programming language. The tutorial includes two different ways of programming to find out the roots of the quadratic equation. Explanation The equation with power two is called a quadratic equation. The standard equation of the quadratic equation is − $$\mathrm{a\:x\:^{\wedge}\:2\:+\:b\:x\:+\:c\:=\:0}$$ In the above equation a, b, and c are coefficients where a cannot be zero. To find the nature of the roots of the quadratic equation i.e they are real or imaginary first we need to find the discriminant of the equation using the ...
Read MoreHow To Find The Area of a Trapezium in Golang?
In this tutorial, we are going to see the Golang program to find the Area of a Trapezium. The area is the total space covered by any closed figure. Formula Area of Trapezium - ½ * (b1 + b2) * h b1 - length of one parallel side of a Trapezium b2 - length of another parallel side of a Trapezium h - the distance between the parallel sides of a Trapezium. For example, the length of one parallel side of a Trapezium is 10 cm and the other parallel side is 8 cm, and the distance between ...
Read MoreHow To Find The Area of a Parallelogram in Golang?
In this tutorial, we are going to see the Golang program to find the Area of a Parallelogram. The area is the total space covered by any closed figure. Formula Area of the Parallelogram - base * height b - length of the base of a Parallelogram h - length of the height of a Parallelogram For example, the length of the base of a Parallelogram is 6 cm and the length of the height of the parallelogram is 4 cm so the Area of a Parallelogram is − b = 6 cm h = 4 cm Area ...
Read MoreHow to Find Area of Square in Golang?
In this tutorial, we are going to see the Golang program to find the Area of a Square. The area is the total space covered by any closed figure. Formula Area of Square - (length of a side) * (length of a side) s - length of a side of a Square For example, the length of a side of a Square is 10 cm so the Area of a Square is − Area = 10 * 10 = 100 cm^2 Finding the Area of a Square within the function Algorithm Step ...
Read MoreHow to Count the Number of Vowels and Consonants in a Sentence in Golang?
In this tutorial, we are going to see how to find the number of vowels and consonants in a sentence in Golang. If any character lies under the set {a, e, i, o , u} then that character is a vowel. Any character that does not lie in the above set is a consonant. Explanation Suppose we have a sentence “India have twenty eight states and eight union territories”. In this sentence, the characters which are bold are the vowels. So, the total vowels are 21 and consonants are 29. Finding the count of vowels and consonants within the function ...
Read MoreHow to Calculate the Sum of Natural Numbers in Golang?
In this tutorial, we are going to see how to find the sum of Natural Numbers in Golang. To do that we have two ways one using the formula itself and the other is to use a for loop we will explore both ways in this tutorial. Formula Sum = ( N * ( N + 1))/2 N = The value of the natural number till which you want to find the sum. Explanation Let's find the sum of the first 6 natural numbers using the above formula. Sum of first 6 natural numbers = 1 + 2 + ...
Read MoreHow to Find the Largest Among Three Numbers in the Golang program?
In this tutorial, we are going to see how to find the largest number among the given number in Golang. This tutorial will cover two ways to do the same thing. Explanation Suppose we have three numbers 33, 76, and 47 so we can observe that 76 > 33 76 > 47 So our Golang code should print 76 as the largest number. Defining the operation within Same Funtion Algorithm Step 1 − Declaring the variables for the number1, number2, number3, and largest of int32 data type. Step 2 − Taking the input for the number1, number2, and ...
Read MoreHow to Compute Quotient and Remainder in Golang?
In this tutorial, we are going to understand the approach to finding the quotient and the remainder by performing the arithmetic operations on the dividend and the divisor provided as input by the user. This tutorial will cover two ways to do the same thing. Explanation To divide any number we use the “ / ” arithmetic operator and to find the remainder we use the “ % ” arithmetic operator Suppose we have a dividend 19 and a divisor 4 then the quotient and the remainder are as follows: Quotient = dividend / divisor = 19 ...
Read More