WELCOME IN THE SEA OF C

Here you find some good quality programs.
If any one want any type of help in C and C++ then you can mail me.
Google

Sunday, January 20, 2008

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:

Aashish said...

Thanks dude.....it really helped us....
because one of my friend was irritating for this.