PROGRAM TO PRINT A PATTERN STARTING FROM Nth ROW

/*PROGRAM TO PRINT A PATTERN STARTING FROM Nth ROW*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,temp,n,a;
clrscr();
printf(“Enter the value for nth row: “);
scanf(“%d”,&a);
n=(a*2)-1;
for(i=1;i<=a;i++)
{
temp=1;
for(j=1;j<=n;j++)
{
printf(“%d “,temp);
temp++;
}
n=n-2;
printf(“\n”);
}
getch();
}

Leave a Reply

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