#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sp,n;
printf(“enter the no::”);
scanf(“%d”,&n);
sp=n-1;
for(i=1;i<=n;i++)
{
for(j=1;j<=sp;j++)
{
printf(” “);
}
for(j=i;j>=1;j–)
{
printf(“%d”,j);
}
for(j=2;j<=i;j++)
{
printf(“%d”,j);
}
printf(“\n”);
sp–;
}
sp=n+1-5;
for(i=n-1;i>=1;i–)
{
for(j=1;j<=sp;j++)
{
printf(” “);
}
for(j=i;j>=1;j–)
{
printf(“%d”,j);
}
for(j=2;j<=i;j++)
{
printf(“%d”,j);
}
printf(“\n”);
sp++;
}
getch();
}
/*123454321
2345432
34543
454
5*/
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sp,n;
printf(“enter the no::”);
scanf("%d",&n);
sp=n+1;
for(i=1;i<=n;i++)
{
for(j=1;j<=sp;j++)
{
printf(” “);
}
for(j=i;j<=n;j++)
{
printf(“%d”,j);
}
for(j=n-1;j>=i;j–)
{
printf(“%d”,j);
}
printf(“\n”);
sp++;
}
getch();
}
/* 1
121
12321
1234321
123454321*/
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sp,n;
printf(“enter the no::”);
scanf(“%d”,&n);
sp=n-1;
for(i=1;i<=n;i++)
{
for(j=1;j<=sp;j++)
{
printf(” “);
}
for(j=i;j>=1;j–)
{
printf(“%d”,j);
}
for(j=2;j<=i;j++)
{
printf(“%d”,j);
}
printf(“\n”); sp–;
}
getch();
}
/*1
12
123
1234
12345 */
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n;
printf(“enter the value::”);
scanf(“%d”,&n);
int i;
int j;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf(“%d”, j);
}
printf(“\n”);
}
getch();
}
![[del.icio.us]](http://www.itshala.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.itshala.com/wp-content/plugins/bookmarkify/digg.png)
![[dzone]](http://www.itshala.com/wp-content/plugins/bookmarkify/dzone.png)
![[Facebook]](http://www.itshala.com/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.itshala.com/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](http://www.itshala.com/wp-content/plugins/bookmarkify/linkedin.png)
![[Twitter]](http://www.itshala.com/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](http://www.itshala.com/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.itshala.com/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.itshala.com/wp-content/plugins/bookmarkify/email.png)


