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
Server Side Programming Articles
Page 1708 of 2109
How to Sort Elements in Lexicographical Order (Dictionary Order) in Golang?
In this tutorial, we will write the Golang program to sort the elements in lexicographical order. The tutorial will include three different ways to do this thing. To do the sorting we need to compare two strings and for that, we will use the < operator it will return a boolean value. If the value on the left side is greater than the right side value lexicographically then it will return false else true. For example, Tutorial < Point - The operator will return true. C++ < Golang - The operator will return false. Algorithm Step 1 − Create and ...
Read MoreHow To Perform nCr (r-combinations) in Golang?
In this tutorial, we will perform nCr(r-combinations) in the Golang programming language. The use case of nCr(r-combinations) is to find the total number of possible arrangements where the order does not matter. In other words, we are selecting the r items from n items where the order does not matter. This tutorial will include two ways to find this in the Golang programming language. Explanation For example, for n =5 and r = 3 nCr = n! / ( r! * ( n - r )! ) = 5! / ( 3! * 2! ) = 120 / ...
Read MoreHow to find the Surface area and Volume of Cuboid in Golang?
In this tutorial, we will see the Golang program to find the Surface Area and Volume of a Cuboid. The area is the total space covered by any closed figure. The volume is the capacity to hold something inside the vessel. Formula l - length of a Cuboid h - the height of a Cuboid w - width of a Cuboid. Surface Area of Cuboid - 2*l*w + 2*w*h + 2*l*h For example, the length of a Cuboid is 10 cm, the height is 5 cm and, the width is 8 cm so the Surface Area of a ...
Read MoreHow 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 MoreHaskell Program to Generate Multiplication Table
In this tutorial, we discuss writing a program to generate a multiplication table in the Haskell programming language. ExampleMultiplication table of 12 up to 10 is 12 * 1 = 12 12 * 2 = 24 12 * 3 = 36 12 * 4 = 48 12 * 5 = 60 12 * 6 = 72 12 * 7 = 84 12 * 8 = 96 12 * 9 = 108 12 * 10 = 120 In this tutorial, we see Program to generate a multiplication table of a number up to the constant range of 10. (Tail ...
Read MoreHaskell Program to Sort Elements in Lexicographical Order (Dictionary Order)
In this tutorial, we discuss writing a program to sort elements in lexicographical order in the Haskell programming language. Haskell is a Declarative, Strongly Typed, and Functional programming language. The computations in Haskell are mathematical functions. The lexicographical order is a dictionary order or in the order of the ASCII values of a character. In this tutorial, we see two different ways to implement a program to sort elements in lexicographical order in Haskell. Program to sort elements in lexicographical order using built-in function sort. Program to sort elements in lexicographical order using custom sorting functions. Algorithm steps ...
Read MoreHaskell program to print ascii values
In this tutorial, we discuss writing a program to print ASCII values in the Haskell programming language. Haskell is a Declarative, Strongly Typed, and Functional programming language. The computations in Haskell are mathematical functions. ASCII stands for American Standard Code for Information Interchange, used in electronic data transfer and communication. These ASCII values represent characters in electronic devices. These values are used to describe characters and data in digital devices. ASCII is a 7-bit number representing a character. Example: 7-bit binary “1100001” represents character ‘a’ whose ASCII value is 97. In this tutorial, we see two different ways to print ...
Read MoreHaskell program to find the largest among three numbers
In this tutorial, we discuss writing a program to find the largest among the three numbers Haskell programming language We are going to learn three different ways to implement programs to find the largest among three numbers in Haskell. Program to find the largest among three numbers using if-else. Program to find the largest among three numbers using function max. Program to find the largest among three numbers using function maximum. Syntax variables in functions returning IO actions can be declared and initialized instantaneously using the “let” keyword. let num=100 The above line loads an Integer value ...
Read More