Pattern printing coding 2


CODE NO:- 02

Print the below pattern

#Program (In C):
#include<stdio.h>
int main()
{
int n,i,j;
printf("\n ent the no.of rows:");
scanf("%d",&n);
for(i=0;i<n;i++)
{
        for(j=0;j<n;j++)
  {
printf("%d ",i+1);
        }
printf("\n");
}
return 0;
}

We got this output by using DEV C++ (IDE) 

Comments

Post a Comment

Popular posts from this blog

WHY PROGRAMMING?

Series code 2

Pattern Printing coding 7