# Tag Archives: pattern-printing

## Program to print interesting pattern in Java.November 20, 2017

Java Program to print following pattern: ********1******** *******2*2******* ******3*3*3****** *****4*4*4*4***** ****5*5*5*5*5**** ***6*6*6*6*6*6*** **7*7*7*7*7*7*7** Examples: Input : 4 Output : ********1******** *******2*2******* ******3*3*3****** *****4*4*4*4***** Input :5… Read More »

## Printing string in plus ‘+’ pattern in the matrixNovember 17, 2017

Given a string, print it inside a matrix in such a way that a ‘plus’ is formed. Examples: Input: TOP Output: X T X T… Read More »

## Program for diamond pattern with different layersNovember 14, 2017

Given a number n and using 0-n numbers u have to print such a pattern. Examples: Input : n = 5 Output : 0 0… Read More »

## Inner reducing pattern printingNovember 7, 2017

Given a number N, print the following pattern. Examples: Input : 4 Output : 4444444 4333334 4322234 4321234 4322234 4333334 4444444 Explanation: (1) Given value… Read More »

## Print symmetric double triangle pattern

Given a value n, we need to print the following pattern accordingly, using only constant extra space. Examples: Input : n = 1 Output :… Read More »

## Program to print hollow pyramid and diamond patternNovember 2, 2017

Prerequisite : Loops, If Else Statement 1. Hollow pyramid/triangle pattern The pattern is similar to pyramid pattern. The only difference is, we will replace all… Read More »

## Program to print a rectangle patternOctober 22, 2017

Given height h and width w, print a rectangular pattern as shown in example below. Examples: Input : h = 4, w = 5 Output… Read More »

## C++ program to print pyramid patternOctober 11, 2017

Given a positive integer n. Task is to print the pyramid pattern as described in the examples below. Examples: Input : 2 Output : 1… Read More »

## Program to make a histogram of an arrayOctober 2, 2017

Given an array of integers, print histogram of array values. Examples: Input : 0 11 2 13 5 12 8 11 12 9 Output :… Read More »

## Pattern Printing question asked in CGI Coding RoundSeptember 13, 2017

Write a program that receives a number as input and prints it in the following format as shown below. Examples: Input : n = 3… Read More »

## C program to print binary right angle triangleSeptember 8, 2017

Binary right angle triangle consists of only 0’s and 1’s in alternate positions. Examples: Input : 4 Output : 0 1 0 0 1 0… Read More »

## Program that receives a number and prints it out in large sizeAugust 28, 2017

Question: Write a program that receives a number as input and prints it in large size on a same line as shown below in the… Read More »

## Print the following pyramid patternAugust 21, 2017

Given a positive integer n. The problem is to print the pyramid pattern as described in the examples below. Examples: Input : n = 4… Read More »

## Print a given matrix in zigzag formJuly 24, 2017

Given a 2D array, print it in zigzag form. Examples: Input : 1 2 3 4 5 6 7 8 9 10 11 12 13… Read More »

## C program to print solid and hollow rhombus patternsJuly 10, 2017

For any given number n, print Hollow and solid Squares and Rhombus made with stars(*). Examples: Input : n = 4 Output : Solid Rhombus:… Read More »