Star printing program in c, Pattern 1

Pattern 1:



Discussion: 
This code will print 1 star in first row and from next row it increase
by 1 to n.

Code:

#include <stdio.h>

int main()
{
    int i,j;
    for(j=0;j<8;j++)
    {
        for(i=0;i<=j;i++)
            {
               printf("*");

            }
            printf("\n");
    }
    return 0;
}
 

Return to:

How to print stars pattern (" * ") in C ?                                                                        Next pattern

 

Star printing program in c coding, pattern 1. How to print star in java and c programming.How to print star in java and c code. star printing code in c programming.