c-numbered-pattern

About this program

In this program we are going to print a rectangular shaped pattern in C.This program will contain 5 rows and 5 columns. Unlike previous programs, this program will only contain numbers.
For example, the first row will contain only 1s, the second row will contain only 2s and similarly, third row will only contain 3s.

Logic

Same as all the pattern programs, here also we are using two “for..loops” for rows and columns. For printing numbers, the logic is exactly same as this java program (check the code explanation of this page).

Code

Output

 

 

C program to print rectangular shaped pattern with numbers
Tagged on:     

Leave a Reply

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