“Print Number Square Pattern in C Programming” is a C program to display number pattern in the shape of a square as shown in the following figure:
The source code for printing a number square pattern in C programming is as follows:
/* Write a program to print number pattern square shape in c programming language as shown below 11111 22222 33333 44444 55555 */ #include<stdio.h> int main() { int row, col; for( row = 1; row <=5;row++) { for(col=1; col<=5; col++) printf("%d",row); printf("\n"); } return 0; }
Here is an image to show the sample run and output of this C program to display a square shape made by numbers.