Search C Program

Alphabet Pattern - 12

AAAAA
BBBB
CCC
DD
E


#include <stdio.h>

int main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=5;j>=i;j--)
        {
            printf("%c",'A'-1 + i);
        }
        printf("\n");
    }

    return 0;
} 


3 comments:

  1. how to write this code using cout statements?

    ReplyDelete
  2. java eclipse example ples?

    ReplyDelete
  3. How to "\" in c if non-english keyboard is there?
    E.g. By this caret sign can be done

    ReplyDelete