Akhil Sharma has Published 671 Articles

Haskell Program to Print Reverse Pyramid Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 20-Apr-2023 11:58:49

132 Views

Haskell has internal functions like mapM and ForM functions to print a revered Pyramid pattern star. A reverse pyramid star pattern is a pattern of asterisks (stars) arranged in the shape of an inverted pyramid. Algorithm Step 1 − Program execution will be started from main function. The main() ... Read More

Haskell Program to Print Pyramid Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 20-Apr-2023 11:57:56

134 Views

In Haskell, we can use mapM and ForM functions to print pyramid-patterned stars. A pyramid star pattern is a design or arrangement of stars or other symbols in the shape of a pyramid. It is created by printing stars or symbols in multiple rows, starting from the top and moving ... Read More

Haskell Program to convert Hexadecimal to Decimal

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:46:08

429 Views

This tutorial will help us to creat a haskell program that can covert a given hexadecimal number to a decimal number using revers, map and fold1 functions Hexadecimal to decimal conversion is the process of converting a number from the hexadecimal number system to the decimal number system. The hexadecimal ... Read More

Haskell Program to convert Decimal to Octal

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:44:56

118 Views

We can convert the Decimal number to an Octal using the recursion and unfoldr function of Haskell. Decimal to octal conversion is a process of converting a decimal (base-10) number to its equivalent representation in octal (base-8) numbering system. In decimal numbering system, we use 10 digits (0 to 9) ... Read More

Haskell Program to Print Half Diamond Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:43:33

86 Views

We can create a half-diamond star pattern in Haskell using recursive and replicate functions. The half-diamond star pattern is a pattern made up of asterisks (*) arranged in the shape of a half-diamond. It is typically created by printing a series of asterisks in a pyramid shape, starting with a ... Read More

Haskell Program to Print Hollow Right Triangle Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:41:38

148 Views

In Haskell we can use the replicate function and recursive function to create a hollow right triangle star pattern. A hollow right triangle star pattern is a pattern made up of asterisks (*) that forms a right triangle shape with empty spaces in the middle as shown below. ** * ... Read More

Haskell Program to Print 8-Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:39:42

100 Views

In this tutorial, we are going to learn how to develop a Haskell program to print 8 start patterns using the internal replicate and concat function. An '8' star pattern is an ASCII art representation of the number 8 using asterisks. as shown below − ******** * ... Read More

Haskell Program to Create Pyramid ‘and’ Pattern

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:38:51

106 Views

In this tutorial, we are going to understand how to develop a Haskell program that will create a pyramid pattern of ‘&’ using mapM, forM, and recursive function. A pyramid ‘&’ pattern is a design or arrangement of ‘&’ or other symbols in the shape of a pyramid as ... Read More

Haskell Program to Print Square Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:36:54

241 Views

In Haskell we can use internal functions like mapM, forM or recursive functions to print square star pattern. A square star pattern is a two-dimensional pattern made up of stars (or asterisks, represented by the '*' symbol) arranged in the shape of a square as shown below. **** **** **** ... Read More

Haskell Program to Print Star Pascal’s Triangle

Akhil Sharma

Akhil Sharma

Updated on 06-Apr-2023 10:35:15

321 Views

In Haskell we can use mapM function and forM function to print a star Pascal’s Triangle. A star Pascal's triangle is a variation of the traditional Pascal's triangle that uses asterisks (or stars) instead of numbers to form a triangular pattern as shown below. * ... Read More

Advertisements