C Program to print numbers in rows and columns of Quadrangle pattern
Program
#include<stdio.h>
void main()
{
int n, i, j;
printf("Enter the number of rows: ");
scanf("%d", &n);
for(i = 1; n >= i; i++)
{
for(j = 1; j <= n; j++)
printf("%d ", j);
printf("\n");
}
}
Output
Enter the number of rows: 6
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6