Monday, 5 October 2015

Program to print Alphabet Patterns.

  
   
#include<stdio.h>
//#include<conio.h>
void main() {
    int i, j;
    char a = 'A';
    //clrscr();
    for (i = 5; i > 0; i--) {
        for (j = i; j > 0; j--) {
            printf("%c", a);
        }
        a++;
        printf("\n");
    }
    //getch();
}
Note: Remove the comment line when you are use Turbo C IDE for run your program.

No comments:

Post a Comment