recent

c program to print alphabet pattern

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

#include <stdio.h>

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