Tuesday, 7 April 2015

C Program to print the following Pattern.

Aa
Aa    Bb
Aa    Bb    Cc


#include<stdio.h>
#include<conio.h>
main()
{
                int i,j;
                char c;
                clrscr();
                for(i=1;i<4;i++)
                {
                                c='A';
                                for(j=1;j<=i;j++,c++)
                                {
                                                printf("%c%c\t",c,c+32);
                                }
                                printf("\n");
                }
                getch();
}

No comments:

Post a Comment