CODE ::
#include <stdio.h>
int main ()
{
int i,j,k,s,n;
printf("N = ");
scanf("%d",&n);
for(i=1,j=n;j>0,i<=n;j--,i++)
{
for(s=0;s<j;s++)
{
printf("\t");
}
for(k=1;k<=i;k++)
{
printf("%d",i);
for(s=1;s<=2;s++)
{
printf("\t");
}
}
printf("\n\n");
}
return 0;
}
No comments:
Post a Comment