PROGRAM TO PRINT A PATTERN UPTO N ROWS

/*PROGRAM TO PRINT A PATTERN UPTO N ROWS*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,temp,n;
clrscr();
printf(“Enter the limit of rows: “);
scanf(“%d”,&n);
temp=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf(“%d\t”,temp);
temp++;
}
printf(“\n”);
}
getch();
}

Leave a Reply

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