skip to main |
skip to sidebar
Simplified pattern code
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,a=4;
clrscr();
for(i=0;i<5;i++)
{
for(j=0;j<9;j++)
{
if((j>7-i||j<i+1)
printf("%d ",a);
else
printf(" ");
}
printf("\n");
a--;
}
getch();
}