Skip to content

Tag Archives: pattern-printing

Given a number N, the task is to print Hut of width n. Output Below is the code to implement the above problem: Program: C++… Read More
Given the length as rows and breadth as cols, the task is to print the mirrored hollow parallelogram. Examples: Input: rows = 5, cols =… Read More
Given the total number of rows as n, the task is to print the given pattern. * 1* *2* 1*3* *2*4* 1*3*5* *2*4*6* 1*3*5*7* *2*4*6*8*… Read More
Given a number N such that N >= 5. The task is to print a Hut Star Pattern with (N + 3) rows as shown… Read More
Given a number n, the task is to write a program to draw the following pattern using ‘$’. $ $ $ $ $ $ $… Read More
Given a number N denoting the number of rows. The task is to print the zigzag pattern with N rows as shown in the below… Read More
Given task is to draw a KITE pattern using ‘$’ Example: Output: $ $$$ $$$$$ $$$$$$$ $$$$$$$$$ $$$$$$$ $$$$$ $$$ $ $$$ $$$$$ Below is… Read More
We have discussed iterative pattern printing in previous post. Examples: Input : 7 Output : * * * * * * * * * *… Read More
Write a java program to print the given Square Pattern on taking an integer as input from commandline. Examples: Input : 3 Output :1 2… Read More
Given an integer n, the task is to print the Inverse Diamond Pattern in 2n-1 rows. Example: Input: n = 3 Output: *** *** **… Read More
Given a number N which represents the number of rows. The task is to print a half diamond Number-Star pattern as shown in the below… Read More
Numeric incrementing triangle pattern Write a program to print a Numeric incrementing triangle pattern starting with a given number N. Examples: Input : 3 Output… Read More
Given ‘num’ which indicates number of lines.The task is to print a trapezium pattern in num lines. Examples: Input : 4 Output : 1*2*3*4*17*18*19*20 5*6*7*14*15*16… Read More
Give Height and Width of a Wave to print the pattern Examples: Input : wave_height=5 wave_length=10 Output : >> >>>> >>>> >>>> >>>> >>>> >>>>… Read More
Give Height and Width of a Wave to print the Sine wave pattern Examples:   Input : wave_height=5 wave_length=10 Output : 0 0 0 0 0 0… Read More