recent

c program to print alphabet pattern

write a c program to print alphabet pattern
tsrqp
tsrq
tsr
ts
t

#include <stdio.h>

int main()
{
    int j,k;
    for(j=1;j<=5;j++)
    {
        for(k=5;k>=j;k--)
        {
            printf("%c",'p'-1 + k);
        }
        printf("\n");
    }
}
Powered by Blogger.