Introduction Traditionally, cryptocurrencies are kept as private keys on computer networks; this is why there is still a significant black market for stolen wallets and cryptocurrency funds that one cannot track. The blockchain revolutionized this process by creating a real-time ledger of all transactions across the Bitcoin network. Every transaction or information modification is recorded onto the blockchain, providing an open and transparent record of who owns how many Bitcoins (and at what price). Experts say it's the next evolution of public ledgers. The blockchain was first released in 2008 when Satoshi Nakamoto developed Bitcoin as an alternative to currencies ... Read More
In this tutorial, we discuss writing a program to get input from the user in the Haskell programming language. Haskell is a Declarative, Strongly Typed, and Functional programming language. This tutorial discusses reading numbers from standard input in the Haskell Programming language. Haskell is a purely functional Language. Pure functions are the ones that return the same output for the same arguments. Taking user input changes the program’s nature to impure. Haskell introduced a type IO that differentiates impure functions from pure functions. A function declaration with type IO infers that it is an impure function that interacts with the outer ... Read More
In this tutorial, we discuss writing a program to get input from the user in the Haskell programming language. Haskell is a Declarative, Strongly Typed, and Functional programming language. Computations in Haskell are mathematical functions. In this tutorial, we discuss two ways to get input from the user in Haskell. User input using the getLine method. User input using the getChar method. As Haskell is a purely functional Language. Pure functions are the functions that return the same output for the same arguments. Taking user input changes the program’s nature to impure. Haskell introduced a type IO that ... Read More
This tutorial will discuss writing a program to add two complex numbers in the Haskell Programming Language. Haskell is a declarative, strongly typed, and functional programming language. The computations in Haskell are mathematical functions. Complex numbers are a combination of real and imaginary values. Example: 1 + 2i, where i is √-1 In this tutorial, we see four ways to Add two complex numbers. Computing the addition using the infix operator for addition “+”. Implementing addition computation in a separate function. Computing the addition using the infix operator “+” as a function. Computing the addition of complex numbers by ... Read More
This tutorial will discuss writing a program to display characters from A-Z in Haskell programming Language. Haskell is a Functional, Declarative, and Strongly Typed Language. The computations in Haskell are mathematical functions. In this tutorial, We see two ways to display Alphabets in Haskell. An iterative Program to display Alphabets. A recursive Program to display Alphabets. Note − Haskell doesn’t support Loops, So we mimic the function of a loop with other iterative and recursive implementations. Algorithmic Steps Implement the logic for printing Alphabets. Print/display Alphabets. Displaying Alphabets In An Iterative Way Using List Comprehensions. Example Program ... Read More
This tutorial will discuss writing a program to find the LCM of two numbers in the Haskell Programming Language. Haskell is a functional programming language. The GCD of two numbers is the Greatest Common Divisor/ Number that divides both numbers Can also be called as Highest Common Factor. In this tutorial, we discuss five ways to implement a program to find the GCD of two numbers. Using the inbuilt function gcd. Using the inbuilt function lcm. Computing GCD using list comprehension. Computing GCD using a recursive function with three arguments. Computing GCD using a recursive function with two arguments. ... Read More
This tutorial will discuss writing a program to find the LCM of two numbers in the Haskell Programming Language. Haskell is a functional programming language. LCM of two numbers is the least common multiple for that two numbers i.e smallest number that is divided by both numbers. In this tutorial, we discuss five different ways to implement a program to find the LCM of two numbers. Using inbuilt function lcm. Computing LCM using list comprehension. Computing LCM using a recursive function. Computing LCM using the HCF (Highest Common Factor) function. Algorithm steps Take the two integers as ... Read More
This tutorial will discuss writing a program to add binary Strings in Haskell Programming Language. The computations in Haskell are Mathematical functions. Binary Strings represent a number in binary form but with String data type. Example: 5 is described as “0101”. Algorithmic steps Take Binary Strings as input. Implement the logic for adding binary Strings Print the resultant Binary String. Program to add Binary Strings We break the program into simpler functions Syntax Importing essential Packages/Modules import Data.Char Data.Char is a useful module for having functions to type cast Character to Integer and Integer to ... Read More
This tutorial will discuss writing a program to display all prime numbers from 1 to N in Haskell Programming Language. Haskell is a declarative, strongly typed, and functional language. The computations in Haskell are mathematical functions. A prime number is one that must have two positive factors 1 and the number itself. Example 2, 3, 5, 7, .. Note 1 is not a prime number because it has only one factor. Algorithm steps Implementing a function to check whether a number is prime. Implementing a function to generate all prime in a range. Display the prime numbers. Program to ... Read More
This tutorial will discuss writing a program to check whether the input number is a Neon Number in Haskell Programming Language. The computations in Haskell are mathematical functions. A neon Number is a number that satisfies the property: number is equal to the sum of the digits of its square. Example: 9 is a neon number because the sum of the digits of its square “81” (8+1) is equal to the number 9. In this Tutorial, we will discuss Program to check whether the number is a Neon number. Program to print neon numbers in a range in an ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP