c program to print star patterns

write a c program to print star patterns
*
**
***
****
*****
******
*******
********
*********

#include <stdio.h>

int main()
{
    int j,k;
    for(j=1;j<=9;j++)
    {
        for(k=1;k<=j;k++)
        {
            printf("*");
        }
        printf("\n");
    }
}

Related Posts