C program to print Pattern 2

#include <stdio.h>
#include <stdlib.h>

int main()
{

   int i,j,n;
   printf("Enter number of row : ");
   scanf("%d",&n);
   for(i=1;i<=n;i++)
   {
       for(j=1;j<=n;j++)
       {

           printf("%d ",i);
       }

       printf("\n");
   }
}

Output:
Patterns Programs

Subscribe For Daily Updates