About this program

This is our second rectangular shaped pattern program with letters. Same as the previous program, this pattern will also contain five rows and five columns and each row will contain only letters.

The pattern will look something like this:

 

CODE

OUTPUT

Code Explanation

Here in this program, we are using two for loops. One for printing rows and one for columns. Each row is having five letters ‘A’ to ‘E’. So to do this we need a for loop.

OUTPUT

Now we need to repeat this for five times. Se we need another for loop which is the outer loop.

OUTPUT

To make it look like a rectangle we need to move the cursor to the next line after printing five letters.

 

 

Rectangular shaped pattern program with letters – C program – Pattern 2
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *