Typical Pattern Program
/* Program to produce a typical pattern */
"/" is used instead of "<" and ">".
#include/stdio.h/
#include/conio.h/
main()
{
int i=1,x=71,blanks=0,j,val,k;
clrscr();
while(i<=7) { j=65; /*ASCII value of A*/ val=x; while(j<=val) { printf("%c",j); j++; } if(i==1) val--; k=1; while(k<=blanks) { printf(" "); k++; } blanks=2*i-1; while(val>=65)
{
printf("%c",val);
val--;
}
printf("\n");
x--;
i++;
}
printf("\n\n\nPress any key to exit");
getch();
}
1 comments:
Thanks dude.....it really helped us....
because one of my friend was irritating for this.
Post a Comment