Tag Archives: Printing-Pattern

Printing Hollow pattern in CPP

Given N = no of rows and M = no of columns, print the hollow pattern. ********** * * * * * * ********** Given above is an example of hollow pattern of 5 x 10. Given below is the approach to built hollow pattern: To iterate through rows, run an outer loop from 1 to rows. Define… Read More »

Snake and Ladder Pattern Formation

Design the pattern as represented in the famous snake and ladders game. Your task is to print the pattern as represented in snake and ladders game for a given integer input N, where N denotes the number of rows and columns of the pattern array. Note: N given will be always even. Examples: Input: N=4 Output: 7 8… Read More »