Skip to content

Tag Archives: pattern-printing

In this article, we will discuss the following top pattern programs in C++ star *, numbers, or other characters. Pyramid Patterns in C++ Simple Pyramid… Read More
A hollow half-pyramid pattern using numbers is a type of pattern that seems like a pyramid shape mostly it is considered a star pattern but… Read More
Given a number N which denotes the number of rows, the task is to follow the below pattern to print the first N rows of… Read More
Given integer N, the task is to print an upside-down triangle where the left half is made of elements in the range [1, N*(N+1)/2] and… Read More
Given the number N, the task is to print a pattern such that in each line all the digits from N to 1 are present… Read More
In this article, we will learn how to print the pattern G using stars and white-spaces. Given a number n, we will write a program… Read More
The idea of pattern based programs is to understand the concept of nesting of for loops and how and where to place the alphabets /… Read More
Given a string S of length N, find the pattern of the strings as shown below in the examples. Examples:  Input: S = “Geek”Output: Geek,… Read More
Print a ‘Y’ shaped pattern from asterisks in N number of lines. Examples: Input: N = 12Output: *             * *  … Read More
Given a matrix mat[][], print it in Wave Form.  Input: mat[][] = {{  1,   2,   3,   4}           … Read More
Given a matrix of 2D array of n rows and m columns. Print this matrix in ZIG-ZAG fashion as shown in figure.   Example:   Input: 1… Read More
Given a matrix of 2D array of n rows and m columns. Print this matrix in ZIG-ZAG fashion as shown in figure.   Example:   Input: 1… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More
Given a 2D array, print it in reverse spiral form. We have already discussed Print a given matrix in spiral form. This article discusses how… Read More