Akhil Sharma has Published 671 Articles

Haskell Program to create a function without argument but return a value

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:59:35

272 Views

We are going to learn how to create a function without argument but return a value using user-defined function. In this article, the user-defined functions are defined that will contain the function definition with some returning value and is being called without passing any arguments to it. In ... Read More

Haskell Program to create a function with arguments but without a return value

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:58:36

200 Views

In Haskell, we will create a function with arguments but without a return value by using user-defined functions. In this article, the user-defined functions are defined that will contain the function definition without returning any value and is being called by passing some desired arguments to it. In all ... Read More

Haskell Program to create a function without argument and without a return value

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:57:16

329 Views

In Haskell, we can create a function without argument and without a return value by using user-defined functions. In all the examples, we are going to define user-defined functions to perform the certain tasks that don’t return any value and are passed without argument like, printGreeting, printMultipleLines, printSquares functions. Algorithm ... Read More

Haskell Program to calculate the base 10 logarithm of the given value

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:35:10

304 Views

This tutorial will help us in calculating the base 10 logarithm of the given value. A logarithm is a mathematical function that calculates the power to which a number (called the base) must be raised to produce a given value. The base 10 logarithm, is a logarithm in which the ... Read More

Haskell Program to calculate the base 2 logarithm of the given value

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:07:53

582 Views

In Haskell, the logarithm is a mathematical function that calculates the power to which a number (called the base) must be raised to produce a given value. The base 2 logarithm, also known as binary logarithm, is a logarithm in which the base is 2. For example, the base 2 ... Read More

Haskell Program to calculate the cube root of the given number

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:06:30

287 Views

This Haskell article will help us in calculating the cube root of the given number. The cube root of a number is a value that, when multiplied by itself three times, equals the original number. For example, the cube root of 8 is 2 because 2 x 2 x 2 ... Read More

Haskell Program to calculate the square root of the given number

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:05:43

2K+ Views

There are different techniques in Haskell to calculate a square root of a number. The square root of a number is a value that, when multiplied by itself, equals the original number. For example, the square root of 9 is 3 because 3 x 3 = 9. Algorithm Step ... Read More

Haskell Program to calculate the area of the rhombus

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:03:56

99 Views

In Haskell there are different methods to calculating the area of the rhombus. We can use sides, diagonals and height on the basis of which, its area can be computed by various methods. Algorithm Step 1 − The Text.Printf module is imported. Step 2 − Defined ... Read More

Haskell Program to find the power of a number using library function

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:02:52

162 Views

This tutorial will help us to find the power of a number using library function. The base value and the exponent value is passed as an argument that is used to find the exponent power of the base value passed. And the final output is displayed. For example, For base ... Read More

Haskell Program to calculate the Lowest Common Multiple

Akhil Sharma

Akhil Sharma

Updated on 01-Mar-2023 10:01:52

388 Views

This tutorial will help us in calculating the Lowest Common Multiple in Haskell Programming. The least common multiple (LCM) is the smallest positive integer that is a multiple of two or more integers. It can be found by listing out the multiples of each number and finding the smallest multiple ... Read More

Advertisements