recent

c program to print alphabet pattern

write a c program to print alphabet pattern
tsrqp
srqp
rqp
qp
p

#include <stdio.h>

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