Search C Program | nimishsoft@gmail.com

Alphabet Pattern - 8

EDCBA
EDCB
EDC
ED
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 + j);
        }
        printf("\n");
    }

    return 0;
}

1 comment:

  1. #include
    int main(){
    int n;
    scanf("%d",&n);
    char a=65+n-1;
    for(int i=n;i>0;i--){
    a=65+n-1;
    for(int j=0;j<i;j++){
    printf("%c",a);
    a--;
    }
    printf("\n");
    }
    }

    ReplyDelete