Template by:
Free Blog Templates

Wednesday, September 30, 2009

Write programs to print alphabatical patterns using C

1) WAP to print the following pattern
A
A B
A B C
A B C D
prog:
#include"stdio.h"
#include"conio.h"
void main()
{
char i, j;
clrscr();
for(i='A'; i<='D'; i++)
{
for(j='A'; j<=i; j++)
{
printf("%c ", j);
}
printf("\n ");
}
getch();
}

0 comments:

Post a Comment

If you have any proble fee free to ask it here