Saturday, August 10, 2019

Numeric pattern 7

Numeric pattern 7:


numeric patterns in cprograms



     1
    21
  321
 4321
54321

#include<stdio.h>
#include<conio.h>

void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=1;j--)
{
if(i>=j)
{
printf("%d",j);
}
else
{
printf(" ");
}
}
printf("\n");
}
getch();
}



EmoticonEmoticon