/*
program in c to print following pattern...
& & & & & & &
& & & & &
& & &
&
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,t,i,j,k,b=0;
clrscr();
printf("\nEnter length:");
scanf("%d",&a);
b=a;
for(i=0;i<a;i++)
{
t=i;
for(j=1;j<=b;j++)
{
for(k=1;k<=t;k++)
{
printf(" ");
}
t=0;
printf("& ");
}
printf("\n");
b=b-2;
}
getch();
}
program in c to print following pattern...
& & & & & & &
& & & & &
& & &
&
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,t,i,j,k,b=0;
clrscr();
printf("\nEnter length:");
scanf("%d",&a);
b=a;
for(i=0;i<a;i++)
{
t=i;
for(j=1;j<=b;j++)
{
for(k=1;k<=t;k++)
{
printf(" ");
}
t=0;
printf("& ");
}
printf("\n");
b=b-2;
}
getch();
}